ERROR when importing in SSIS - cannot convert between unicode and non-unicode string data types
Posted on 2011-10-24
I keep getting this error where it takes the excel data and tries to insert into SQL server table.
The Excel source is selecting hard coded text into the two columns.
So sample SQL for Data Flow Excel Source is:
SELECT '12345' as accountnum,
'the test account' as fundname,
* from [SHEET!$A:$B]
"...columns cannot convert between unicode and non-unicode string data types."
I try to add a "data conversion" dataflow object and choose DT_STR (string) and DT_WSTR (Unicode string).
The SQL table two columns are varchar(20) and varchar(max). I have no idea how to fix this, i tried changing the columns to nvar on the SQL table, but that didn't work either.