Thanks for the tip Jeff.  While reading the POD for DBD::AnyData I
noticed that joins are supported as *simulated*.  Question:  Was this
written before the SQL::Statement module was updated to support joins?
 Can joins really be supported by DBD::AnyData if the call is written
 as:

### CUT
 
$ENV{DBI_PUREPERL} = 1;
use lib "/usr/jdoe/mylibs";
use DBI;
 
$dbh = DBI->connect('dbi:AnyData:(RaiseError=>1)');
 
$dbh->func( 'classes', 'CSV', 'classes.csv', 'ad_import');
$dbh->func( 'profs', 'CSV', 'profs.csv', 'ad_import');

$sth   = $dbh->prepare("

               SELECT classes.title,profs.name
               FROM classes,profs
               WHERE pid = pid
               
               ");

$sth->execute();

while (($classes_title,$profs_name) = $sth->fetchrow_array) {
print "$profs_name teaches $classes_title\n";
}

$sth->finish();

### CUT

Or are there some caveats that should be know about?  Thanks.

Nick Hendler
[EMAIL PROTECTED]

_________________________________________

From:    Jeff Zucker <[EMAIL PROTECTED]>
Date:    Tuesday, June 11, 2002 
Time:    1:00:03 PM
Subject: Uses for DBI::PurePerl?

[EMAIL PROTECTED] wrote:

> The application is written to use
> DBD::CSV by default because it is pure perl and portable.


Actually, though, DBD::CSV depends on Text::CSV_XS which requires 
compilation.  DBD::AnyData, in CSV mode, works almost identically to 
DBD::CSV except that it uses pure perl instead of Text::CSV_XS to do the 
CSV parsing.

-- 
Jeff

Reply via email to