Importing CSV into MySQL leaving quote at end of line -


i'm working open source data set gov.uk on linux server running mysql. i'm trying import table ctsop1.1, looks like:

enter image description here

so issue when import file using:

rm -f import.log; mysql -u userxxx -p --execute="use mydb; load data local infile 'table_ctsop1.1_2015.csv' table ct_2015 fields terminated ',' optionally enclosed '\"' lines terminated '\n' ignore 1 lines;" > import.log 

it produces strange output:

enter image description here

as can see, leaves quotes @ end of lines , skips next line completely, still seems manage right regarding number of columns. ideas what's going on?

thank @sculper this..

it obvious use of \r\n rather \n, case closed can go home.


Comments