tags:

views:

26

answers:

2

What are the potential choices for LINES TERMINATED BY in MySQL?

I have a CSV file that I am trying to upload and neither \r\n, \n, or \r work.

+1  A: 

Try inspecting the file using a binary-displaying utility like od (http://swoolley.org/man.cgi/1/od). That will show you imediately how your lines are terminated.

Brian Agnew
A: 

I agree with brian.

Query which i used to work are as follows.

load data local infile  'test.csv' 
into table test_field fields 
terminated by ','   
lines terminated by '\n'
Salil
I tried \n and it doesn't work
Brian