I am trying to import a CSV file into mysql database. but the query is giving error. The query is :
LOAD DATA LOCAL INFILE ‘/last.csv’ INTO TABLE punjab FIELDS TERMINATED BY ‘,’ ENCLOSED BY ‘”‘ LINES TERMINATED BY ‘\r\n’ (newpoll, blockcode, halqa, pollnumber, pollstation, sex, area);
and the error is
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 '‘/last.csv’ INTO TABLE punjab FIELDS TERMINATED BY ‘,’ ENCLOSED BY ‘�' at line 1
Any ideas ?? thanks
‘
and’
as apostrophes; you probably need to use'
for both.'
for quoting. don't use so-called-smart-quotes-that-really-are-moronic‘
and’