Re: LOAD DATA INFILE date format hell
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