buzzcutbuddha has asked for the wisdom of the Perl Monks concerning the following question:
whose sole purpose is to take the last name from the first recordset $rs and grab the firstmy $crconn = Win32::OLE->new('ADODB.Connection'); my $crrs = Win32::OLE->new('ADODB.Recordset'); $crconn->open("Credentialing"); my $lastname = $rs->Fields("LastName")->{'Value'}; $lastname =~ m/^\b([A-Za-z]+)\b(.*)$/gi if ($lastname); my $rsID = $rs->Fields("ID")->{'Value'}; my $sql = "SELECT * FROM [PHYSICIAN TABLE] WHERE "; $sql .= "[PHYSICIAN TABLE]\.[LAST NAME] LIKE \'\*$1\*\ +';"; print SQLLOG $sql, "\n"; $crrs = $crconn->execute($sql); print LOGFILE "Foo!\n Win32::OLE->LastError()\n" if (Win32::OL +E->LastError()); if ($crrs->eof) { # start matching based on the last name # now would be a good time to use the misspelling module f +rom CPAN # this will be done at a later time $finalmatch{$rsID} = "No Match By Last Name"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
There are different LIKE wildcards between SQL implementations
by Corion (Patriarch) on Jun 02, 2000 at 18:41 UTC | |
by JanneVee (Friar) on Jun 02, 2000 at 19:13 UTC | |
by Corion (Patriarch) on Jun 02, 2000 at 19:24 UTC | |
by JanneVee (Friar) on Jun 03, 2000 at 00:14 UTC | |
by buzzcutbuddha (Chaplain) on Jun 02, 2000 at 19:21 UTC | |
by buzzcutbuddha (Chaplain) on Jun 02, 2000 at 19:13 UTC |