I am creating an SSIS 2008 package that reads data from an ASCII source file and writes it to a SQL Server 2008 database. BIDS complained of an implicit cast between the unicode and non-unicode data types, so I used a column handler to create the cast. It looks like this:
Derived Column Name | Derived Column | Expression | Data Type AccountName2 | Replace 'AName' | (DT_WSTR,100) AName | string [DT_STR]
I still get the same error:
Validation error. InsertAccountRecords: InsertAccountRecords: Columns "AccountName2" and "AName" cannot convert between unicode and non-unicode string data types.
The error appears in the SQL Server Destination application, which makes me think that the problem is related to the data type in the derived column. I drop it from DT_STR to DT_WSTR, but the data type is still nominally DT_STR according to this, no?
I have googled around and I cannot find good answers to this question. Can anybody give any recommendations?
Edit: Yup. Considering a data viewer downstream of derived columns, AccountName2 still appears as DT_STR. Why not cast casting?
Chris source share