DrAxeman has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use warnings; use DBI; # 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 'prospects' $dbh->{'csv_tables'}->{'prospects'} = { 'file' => 'test.csv'}; my $sth = $dbh->do("SELECT avg(ERWWCOMMUNITIES_Memory_Pages_sec) F +ROM prospects"); print ("$sth \n");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: AVG returns COUNT
by japhy (Canon) on Aug 05, 2005 at 20:37 UTC | |
by ChemBoy (Priest) on Aug 05, 2005 at 22:14 UTC | |
by DrAxeman (Scribe) on Aug 06, 2005 at 01:17 UTC | |
by ChemBoy (Priest) on Aug 06, 2005 at 01:38 UTC | |
|
Re: AVG returns COUNT
by borisz (Canon) on Aug 05, 2005 at 20:37 UTC | |
|
Re: AVG returns COUNT
by DrAxeman (Scribe) on Aug 05, 2005 at 22:49 UTC | |
|
Re: AVG returns COUNT
by themage (Friar) on Aug 07, 2005 at 15:18 UTC |