in reply to Re: Joining two files on common field
in thread Joining two files on common field
DBD::CSV::db prepare failed: Parse error near NATURAL JOIN Inventory at /usr/lib/perl5/site_perl/5.8.4/i686-linux/DBD/File.pm line 195. for Statement "SELECT * from Matrix NATURAL JOIN Inventory" at ./j line 7. Can't call method "execute" on an undefined value at ./j line 10.#!/usr/bin/perl -w use DBI; $dbh = DBI->connect("DBI:CSV:f_dir=/home/turn2sp/tmp") or die "Cannot connect: " . $DBI::errstr; $dbh->{'csv_tables'}->{'Matrix'} = { 'file' => 'Matrix.csv'}; $dbh->{'csv_tables'}->{'Inventory'} = { 'file' => 'Inventory.csv'}; $sth = $dbh->prepare("SELECT * from Matrix NATURAL JOIN Inventory"); #$sth = $dbh->prepare("SELECT * FROM Inventory"); $sth->execute(); while ( @row = $sth->fetchrow_array ) { print "@row\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Joining two files on common field
by jZed (Prior) on Sep 22, 2005 at 23:00 UTC | |
by ch1 (Novice) on Sep 23, 2005 at 04:53 UTC | |
by jZed (Prior) on Sep 23, 2005 at 05:10 UTC | |
by Anonymous Monk on Sep 23, 2005 at 20:25 UTC | |
|
Re^3: Joining two files on common field
by ikegami (Patriarch) on Sep 23, 2005 at 17:35 UTC |