tradez has asked for the wisdom of the Perl Monks concerning the following question:
FYI, $db_input is a variable created in the foreach loop that creates the input file, it is explicit in its file location, and again this exact SQL format works perfectly when logged into psql. The errors I get look like this:my $copySQL = "copy snapshot_$formName (name, value, collect_date, omp_id) from ?" my $sth = $dbh->prepare($copySQL); $sth->execute($db_input);
The file I am inputting looks like this:DBD::Pg::st execute failed: ERROR: missing data for column "collect_d +ate" at ./getSnapshot.pl line 180, <FORM_OUT> line 103. Couldn't execute copy snapshot_cco (name, value, collect_date, omp_id) + FROM '/tmp/snapshot_mil-newberlin1_cco.input' statement: 7 at ./getS +napshot.pl line 180, <FORM_OUT> line 103.
The truly strange thing about this is that it fails on line 102 or 103 everytime, the first 100 or so make it through just fine. So whattyah say brethren, can yah help me out?csno,100,20040908,32 alarm1.equip[1] y 20040908 32 alarm1.equip[10] y 20040908 32 alarm1.equip[11] y 20040908 32
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBD::Pg copy issues
by diotalevi (Canon) on Sep 10, 2004 at 15:57 UTC | |
by tradez (Pilgrim) on Sep 10, 2004 at 17:50 UTC | |
by diotalevi (Canon) on Sep 10, 2004 at 18:14 UTC | |
by tradez (Pilgrim) on Sep 10, 2004 at 19:58 UTC | |
by diotalevi (Canon) on Sep 10, 2004 at 21:19 UTC | |
|