in reply to Re^3: Combine data in table
in thread Combine data in table
# Connect to the database, (the directory containing our csv file(s)) my $dbh = DBI->connect("DBI:CSV:f_dir=.;csv_eol=\n;"); # Associate our csv file with the table name 'results' $dbh->{'csv_tables'}->{'results'} = { 'file' => "psinfooutputdiskfile. +csv"}; my @rows = $dbh->selectrow_arrayref("SELECT IP, SUM(PartitionSize), SU +M(PartitionFree) FROM results GROUP BY IP"); print ("@rows\n"); # Just here to view output
SQL ERROR: Can't find table names in FROM clause! Execution ERROR: No command found!.
my @rows = $dbh->selectrow_arrayref("SELECT IP FROM results");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Combine data in table
by davidrw (Prior) on Aug 07, 2005 at 19:30 UTC | |
by DrAxeman (Scribe) on Aug 07, 2005 at 19:49 UTC | |
by davidrw (Prior) on Aug 07, 2005 at 20:19 UTC | |
by CountZero (Bishop) on Aug 07, 2005 at 20:30 UTC | |
by jZed (Prior) on Aug 08, 2005 at 02:52 UTC |