Emil
Emil

Reputation: 6891

convert/match between DT_WSTR and DT_I8

I have a column on my database as DT_I8 (bigint. I am using google analytics template to retreive some data and corresponding column for that column is DT_WSTR. I have to use look up tool to join them but it will not allow me. how can I convert one of them to other? I tried to convert it to bigint with conversion tool by using following (DT_I8)myColumn. what am I doing wrong?

Upvotes: 0

Views: 4961

Answers (2)

Apple_zoom
Apple_zoom

Reputation: 129

If there are some non-numeric values in DT_WSTR data type column, the conversion (DT_I8)myColumn would be failed.

To convert DT_I8 to DT_WSTR data type in ssis, we can use Data Conversion Component or Derived Column Component.

UniCode string [DT_WSTR] as Data type for mycolumn in Data Conversion Component.

(DT_WSTR,1000) mycolumn as Expression in Derived Column Component.

Upvotes: 2

James Rosser
James Rosser

Reputation: 424

In your conversion shape there will be a column "Output Alias".

This is the name of a new column added to the data flow with the output of the conversion.

In the lookup task ensure you are joining the NEW column rather than old one. Then it will have the correct data type.

Upvotes: 1

Related Questions