in reply to Re: Process and combine two CSV files into one
in thread Process and combine two CSV files into one
I tried it and got a error:
So I tried adding column headings as shown in the DBD:CSV page. Same error. Google doesn't produce anything for that error either.
Please note, the CHAR (64) was just a dummy value used for testing ONLY.
Do I have a syntax error?
SQL ERROR: Can't find column definitions!
So I tried adding column headings as shown in the DBD:CSV page. Same error. Google doesn't produce anything for that error either.
# Associate our csv disk file with the table name 'results' $dbh->{'csv_tables'}->{'info'} = { 'file' => "psinfooutputfile.csv"}; $dbh->{'csv_tables'}->{'disks'} = { 'file' => "disk_results.csv"}; $dbh->{'csv_tables'}->{'hosts'} = { 'file' => "netbiosoutputfile.csv"} +; $dbh->{'csv_tables'}->{'hosts'} = { 'file' => "template.csv"}; ###### $dbh->do("DROP TABLE IF EXISTS template"); $dbh->do("CREATE TABLE template (IP CHAR(64), ServerName CHAR(64), Dom +ain CHAR(64), DaysUptime CHAR(64), OS CHAR(64), RAM CHAR(64), OSSP CH +AR(64), InstallDate CHAR(64), CPUSpeed CHAR(64), CPUCount CHAR(64), C +PUType CHAR(64)) AS SELECT IP, ServerName, Domain, DaysUptime, OS, RAM, OSSP, I +nstallDate , CPUSpeed, CPUCount, CPUType FROM hosts LEFT JOIN info ON hosts.IP = info.IP ");
Please note, the CHAR (64) was just a dummy value used for testing ONLY.
Do I have a syntax error?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Process and combine two CSV files into one
by jZed (Prior) on Aug 10, 2005 at 00:45 UTC |
In Section
Seekers of Perl Wisdom