Question

I am trying to use LOAD DATA INFILE in MySQL like this:

LOAD DATA INFILE ‘mfsw_test.csv’ 
REPLACE INTO TABLE mfsw_curr 
FIELDS TERMINATED BY ‘,’ 
LINES TERMINATED BY ‘\n’ 
IGNORE 1 LINES;

I am getting an error:

1064 - You have an error in your SQL syntax; check the manual that corresponds 
to your MySQL server version for the right syntax to use near '‘mfsw_test.txt’ 
REPLACE INTO TABLE mfsw_curr FIELDS TERMINATED BY ‘,’ LI' at line 1

What am I doing wrong?

Was it helpful?

Solution

Check your quotes. the single quote should be a basic ' not the word-ified smartquote ‘’

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top