txt3rob — 2013-07-01T06:14:43-04:00 — #1
I am trying to import a CSV file but my code breaks around the 'r\
' can any one help me work out how to resolve this?
cursor.execute ("LOAD DATA INFILE '/tmp/trains.csv' INTO TABLE trains FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\\r\
'IGNORE 1 LINES;")
fretburner — 2013-07-01T07:41:51-04:00 — #2
Try doubling up on the backslashes:
LINES TERMINATED BY '\\\\r\\\
txt3rob — 2013-07-01T08:21:02-04:00 — #3
Cheers that looks like it would work just need to solve an issue with the columns now
xvinez — 2014-07-31T17:25:35-04:00 — #4
Can someone help me??? Is the node.js part od python or its separate program??? I will start learn node,js thats the future for sure...
arout77 — 2014-08-01T02:13:30-04:00 — #5
If you dont know what node.js even is, I'm not sure how you can be certain "its the future" and something you want to learn.
To answer your question, it has nothing to do with Python.
xvinez — 2014-08-01T08:36:19-04:00 — #6
NVm....i will find it and let u know...