I am trying to import a CSV file into a MySQL database table. The CSV rows look like the following:
\"00602\",\" \",\"42042\",\"15590\",\"0\",\"0\",\"0\",\"3
From the MySQL Reference Manual, use the following options instead:
LOAD DATA INFILE 'data.txt' INTO TABLE tbl_name FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n'
Update to match your usage, but the important part is to drop the OPTIONALLY from OPTIONALLY ENCLOSED BY.
OPTIONALLY
OPTIONALLY ENCLOSED BY