MySQL Forums
Forum List  »  Newbie

LOAD DATA INFILE problem - NEWBIE
Posted by: Tim Morgan-Barrett
Date: January 31, 2007 07:19PM

hi guys, newbie question...

i have a csv file a section of which is below, when i try and load this in 5.0 using load data infile <filename> etc it fails as the timedate field - first column has " characters in there, and ideas how to make this work...


"2007-01-31 20:55:00",576,554,1,11.91,24.84,12.36,10.4,11.02,11.87,10.24,11.68,11.54,10.84,11.26,11.43,11.55,10.83,11.64,12.49,12.28,12.96,12.65,11.85,12.72,10.34,10.92,11.72,12.69,0,0,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,355,355,355,1
"2007-01-31 10:25:00",0,554,1,11.91,24.39,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,1,1,1,1
"2007-01-31 10:26:00",1,554,1,11.91,24.39,0.933,1.118,0.907,0.01,0,0,0,0,1.206,1.172,0.231,0,0,0,0,0.374,1.261,1.21,0.02,0,0,0,0,0,0,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,2,2,2,1

as you can see only the date/time has the " char. the rest is CSV

assuming we can get this working, any ideas how to schedule this to run to update the table at regular intervals...

cheers

Tim

Options: ReplyQuote


Subject
Written By
Posted
LOAD DATA INFILE problem - NEWBIE
January 31, 2007 07:19PM


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.