Answer the question
In order to leave comments, you need to log in
How to properly import CSV to SQL?
I ran into a problem with importing CSV separated by semicolons and quoted. in SQL format. I'm using import in php my admin, however it doesn't separate fields correctly on import. Apparently it reacts to some characters found in the string. It turns out that the data is either truncated, or completely fall into the wrong field. The first row contains the headers. Please help me figure it out!
Here is the file:
www.ex.ua/view/79705458
Answer the question
In order to leave comments, you need to log in
dev.mysql.com/doc/refman/5.1/en/load-data.html
LOAD DATA INFILE 'data.txt' INTO TABLE tbl_name
FIELDS TERMINATED BY ',' ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
IGNORE 1 LINES;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question