I have a variable @stringvar which is DT_WSTR and is set to -1
I need to set a Column in data flow Col1 which is INT to this variable @stringVar.
in order to do this, In dervice colmn transformation I just Replace the Col1 with expression: ISNULL(Col1) ? (DT_I8)@[ConstantsMeta::strinVar] : Col1
however, this fails with an error unable to cast to INT.
it was a typo..
Col1 is INT I need to update that column with variable stringVar which is STRING having value -1
ISNULL(Col1) ? (DT_I8)@[ConstantsMeta::stringVar] : Col1
It throws an error: Unable to cast to INT. Need to know how to CONVERT this DT_WSTR string to DT_I8 INT?
Here is a simlar thread, please take it as a reference,
Casting DT_WSTR to integers in SSIS: http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/15da5f98-5c91-4f0f-a42b-939eacda77ed/