When importing a csv
file into SQL Server 2019 via Import/Export wizard I am getting following well known error despite the fact that the destination
column length is varchar(50)
and the source
column length is 22
. I thought this highly active stack overflow response would have resolved the issue. But no success.
Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "column_name" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
(SQL Server Import and Export Wizard)
Similar to what is advised in the above linked response to a similar question, in the advanced tab of the wizard, I am correctly getting the destination column data type, as shown below:
Question: what else could be a cause of the error and how can we resolve it?