- or download this
sub SQL_FUNCTION_POSITION {
my($sth,$rowhash,@params) = @_;
return index($params[1],$params[0]) +1;
}
# e.g. SELECT col1 FROM tbl WHERE POSITION('foo',col2) < 3;
- or download this
sub SOUNDEX {
my($self,$sth,$rowhash,@params)=@_;
...
my $s2 = soundex($params[1]) or return 0;
return $s1 eq $s2;
}
- or download this
use DBI;
my $dbh = DBI->connect('dbi:File(RaiseError=1):');
...
$sth = $dbh->prepare("SELECT * FROM Prof NATURAL JOIN Class");
$sth->execute;
$sth->dump_results;
- or download this
$sth = $dbh->prepare("SELECT * FROM _1(?) AS x NATURAL JOIN _2(?) AS y
+");
$sth->execute( $pg_sth, $mysql_sth);