Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LOAD DATA INFILE problem...

Status
Not open for further replies.

mzcnoelle

Programmer
Aug 21, 2003
1
MY
hihi...
I'm trying to load a csv file into MySQL database. I tried using LOAD DATA INFILE but i managed only to load one row of record. I'd very much like all the records from the csv file to be inside my database table. Any idea what is wrong? I am under the impression that LOAD DATA INFILE will save all the record within a csv file into the table is use correctly. Correct me if i am wrong.
Below is my SQL statement:

load data infile 'E:/030425_203_126_222_222.csv' into table voip_db.April2003 fields terminated by ',' lines terminated by '\n';

Noelle

 
Are the lines of your CSV terminated by "\n"?

If the CSV was created on a Mi¢ro$oft OS, each line will be terminated by "\r\n".

If the CSV was crated on a Macintosh, each line could be terminated by "\r".

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top