2
votes

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

1

1 Answers

3
votes

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.

Transformation example

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:

Mapping example

You can either drag and drop, or pick from the drop down below.