I tried to insert data from table A to table B but encounter the error below, even though there is no ASCII characters exists in table A. I tried to cast the data as char in table A, but it's not working so far.
[Amazon](500310) Invalid operation: Invalid input
Details:
-----------------------------------------------
error: Invalid input
code: 8001
context: Only ASCII characters are allowed in fixed length strings. Invalid ASCII char: ef
query: 24440940
location: string.cpp:204
process: query1_123_24440940 [pid=711]
-----------------------------------------------;
At another cluster, I have no error and the cluster version is the same, 1.0.31651.
According to an article, comparing char and varchar, char might be converted to varchar internally, and depends on the data in columns, seems to make the error happen. I'm still not sure why, since there contains only numeric (product code) though.
Redshift CREATE TABLE Error - invalid characters
I'm thinking to use only varchar in that table A and table B. Is there any better idea?