I'm trying to output query results to a csv file. I'm running this currently:
mysql -u user -p -e "$Query" --batch --raw | tr '\t' ',' > file.csv;
The problem is that there are some fields that are a text/description that contains "," (comma), and that's where things get messed up. I tried also to run only with batch/raw but still no luck.
How can I fix this?