I am connecting to a MySQL database using Java. I am executing this query:
String query =
"SELECT * FROM TT2 " +
"INNER JOIN " +
"`Language Pref` " +
"ON tt2.msisdn = `language pref`.MDN " +
"INTO OUTFILE 'c:/test12226.csv' " +
"FIELDS TERMINATED BY ',' " +
"ENCLOSED BY '\"' " +
"LINES TERMINATED BY '\n'";
I am executing this query using executeQuery(query).
The CSV file generated is perfect except for the last column. In the original table called Language Pref
the last column had some null or empty cells. In the CSV file, wherever there were these null cells in the original table language pref, I am getting "\N" instead of the null cells as should be.
How can I correct this?