sql - SSIS Derived Column Calcuation Issue -
i having issue derived column calculation in ssis not returning correct values. give background, had change format of calculation due overflow issue (resolved), see here - ssis - derived column calculation error
now, old , new calculations return different values in ssis, though both mathematically same , return same value when executed in .net, excel , sql.
in .net -
decimal test1 = convert.todecimal((415 * 415 * 415) * 0.000000030940000); decimal test2 = convert.todecimal((0.000000030940000 * 415 * 415 * 415)); both return 2.2113862225
in ssis -
test1 = ((415 * 415 * 415) * 0.000000030940000) test2 = (0.000000030940000 * 415 * 415 * 415) return different values (test1 = 2.2113862225 , test2 = 2.211535)
interestingly, ssis sees test1 numeric (38,6) , test2 numeric (27,15)....
has encountered issue before?
i don't want have re-factor whole package use .net calculations, last resort solution.
in case else has problem - didn't find solution did implement workaround -
instead of doing calculation in derived column -
- use derived column component reate variable , set 0
- add data conversion , switch required data type (float in case)
- add ole db command call stored procedure calculation, output parameter filling variable created @ point 1.
Comments
Post a Comment