fellow luggers:
On the following inherited sql load statement I keep getting syntax
errors for the 'particular version' I am using. Currently using mysql
5.0.22
Can anyone "SEE" any syntactical error? If so please advise?
Thanks
$query="LOAD DATA
INFILE '$dbfile'
INTO TABLE $tablename IGNORE
FIELDS TERMINATED BY \",\"
ENCLOSED BY \"'\"
( 'invoice_no',
'date',
'po',
'terms',
'custid',
'addrcustid',
'name',
'addr1',
'addr2',
'citystate',
'amtdue',
'dbid',
'page_no',
'file',
'file_location' )";
$cmd=$dbh->do($query) or $error_msg.="Could not execute $query:
$DBI::errstr\n";
The errors point to the fields terminated by area but even when I remove
them I still get the errors. Also, I've tried different quoting
characters (i.e." \''\' instead of \"'\") with no better results.
Thank anyone.
Bob
More information about the ECLUG mailing list