Reputation:
When I run ssis package I receive this error "cannot convert between unicode and non-unicode string data types", my source is Oracle and when I check my output columns data type they are all Unicode string[DT_WSTR] and my destination which is SQL data type for Input Columns are DT_WSTR . how can I do this conversion?
help are appreciated in advance friends
Upvotes: 2
Views: 24220
Reputation: 14189
Use a particular Data Flow operation (between your source and your destination) that is called Data Conversion. Inside, convert each value from WSTR to STR (they will be added as new columns inside your flow). You will have to supply the length of each string. Keep in mind the data loss between converting from unicode (2 bytes per character) to windows code page 1252 (in this example) which is 1 byte per chatacter.
In this example I'm transforming a column called NAME
to a new one called NAME (STR)
, the new data type is DT_STR
and it's length is 50.
You will have to map the new converted column to your table in the destination insert box.
Edit:
This is how you change your mapping in the destination:
You can either drag and drop, or pick from the drop down below.
Upvotes: 4