Loading bit column into int colum using ssis
Hi,
I want load table data into another table using Data Flow Task in SSIS.
table1: idflag(bit)
table2: idflag(int)
But while loading, the values 1 is loading as -1 and 0 is coming as 0. Why 1 is loading as -1 into destination? Can anyone help me in this.
Note: If I write query using execute sql task, Data is loading correctly.
June 27th, 2012 1:28pm
Because you likely defined the data as a boolean coming into the flow which is true false. Traditionally true = -1
Just perform an ABS in a derrived column block to remove the sign.Chuck Pedretti | Magenic North Region | magenic.com
Free Windows Admin Tool Kit Click here and download it now
June 27th, 2012 1:57pm
ABS is not working on data type bit(idFlag). Is there any other way to do this?
June 28th, 2012 1:48am
I got it. Converted into int first and then applied ABS.
Thank you Chuck
Free Windows Admin Tool Kit Click here and download it now
June 28th, 2012 4:20am