I have a table with a varchar(50) column = name. I have uploaded values from a local csv file such that the table looks like below. There are no errors/warnings on the import and I have imported other csv files of the same format (Windows Comma Separated) without having this issue.
***************
ID * columnName
***************
1 * any
2 * thing
3 * helpful
When I run:
SELECT * FROM myDB.tableName;
I see the table as shown above. However, when I run:
SELECT * FROM myDB.tableName WHERE columnName = "any";
I get no rows returned. If I then overwrite the csv loaded value in the table by:
UPDATE myDB.tableName SET columnName='any' WHERE ID= 1;
and then run the same query, then the row is returned as expected. So, at this point, I have two questions:
How can I prevent the csv uploading values that are not recognized as strings?
How can I bulk update all of the currently loaded values in columnName to be recognized as strings (I can't do individual updates as shown above, since there are too many rows affected)?