MySQL Forums
Forum List  »  Newbie

Re: LOAD DATA INFILE date format hell
Posted by: Gary Thomas
Date: January 24, 2007 08:49AM

still not working
here is the code Result csv content and table.

Any help on this matter would be appreciated.


LOAD DATA INFILE '/tmp/Net5+export.CSV' INTO TABLE ostc.`Net5+export`
FIELDS TERMINATED BY ',' ENCLOSED BY '"'
(@date,column2,column3,column4,column5,column6,)
SET column1 = date_format(str_to_date(@date, '%d-%M-%Y'), '%m/%d/%Y');

Result
Unknown column 'column1' in 'field list'
or

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
SET column1 = date_format(str_to_date(@date, '%d-%M-%Y'), '%m/%d/%Y')' at line 3

csv
"22-JAN-07","OKY","OKY","GBP","", 2194.9920000,

table
Date | Client | Account | Currency | Blank | Balance

Many Thanks in advance

Gary Thomas

Options: ReplyQuote


Subject
Written By
Posted
Re: LOAD DATA INFILE date format hell
January 24, 2007 08:49AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.