First time reader but first time posting here.
I am trying export a MySQL table to a .csv file. This works totally fine:
SELECT * INTO OUTFILE '/tmp/0405151831.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n'
FROM temp;
So exporting isn't the issue at all. But when I go to open in Excel, the escape character '\' shows up with all special characters in the spreadsheet.
I'm learning with a full list of 20k+ items provided by a plumbing supplier (they sent me spread sheets and I have been saving them as .csv, importing and exporting with MySQL to fill tables and to dick around on my own). Their list contains a plethora of ", ', * and all the other crap that may normally need escaping in basically each line.
I tried to get just get rid of the ENCLOSED BY and ESCAPED BY statements but guess what? There's plenty of commas in there too.
How do I keep the escape character from being exported into the .csv?