try this: FIELDS TERMINATED BY ',' ENCLOSED BY '\\'' --- "R. Mariotti" <r.mariotti at fdcx.net> wrote: > 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 > ____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
More information about the ECLUG mailing list