MySQL Forums
Forum List  »  Newbie

LOAD DATA FILE csv - Incorrect decimal with ""
Posted by: Gerald Novak
Date: December 06, 2012 02:14PM

I have a rather large (4.5g) CSV file that is comma delimited with each field enclosed by quotes "
Values that are null have a set of quotes with no space in between - ie. ""
When I try to use
LOAD DATA INFILE ...
COLUMNS TERMINATED BY ',' ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 LINES

I get a error:
Incorrect decimal value: " for column XXX at row 1
the row in question looks like this:
"1932443199","1","","",.....

The third field is the one giving the error.
The field is setup to accept Null and a default of {null}

I would like it to give me a blank, or at least get through the load.
I would rather not have to manipulate the file.

Any ideas out there?

Options: ReplyQuote


Subject
Written By
Posted
LOAD DATA FILE csv - Incorrect decimal with ""
December 06, 2012 02:14PM


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.