tags:

views:

34

answers:

0

Hi there,

When converting from DT_Decimal to DT_Str, the derived column stips off decimals from my result.

ex.: -0.1250 returns -0.125 -2.0000 returns -2

Is there a way to keep the zeros to have a final string with always four decimals ?

Here is my derived column for the decimal value calculation:

(DT_DECIMAL,4)ROUND((DT_Decimal,4)[Column 1] / (DT_DECIMAL,4)@[User::rate],2)

Here is my string expression to bring it to right aligned string with 11 characters:

RIGHT(REPLICATE(" ",11) + TRIM((DT_STR,11,1252)
(DT_DECIMAL,4)ROUND((DT_Decimal,4)[Column 1] / (DT_DECIMAL,4)@[User::rate],2)
),11)

I'm using SSIS 2008.

Thanks in advance. Francis