Search code examples
sql-serverssisetlderived-column

SSIS rounding number to 2


I have a column of type DT_NUMERIC(16,4). How can I round to number to 2 digits is SSIs in derived column? I tried sound(column,2) and it doesnt work for me.

I have also tried (DT_NUMERIC,16,4)ROUND([Column],2) , it doesnt work either

Currently I have = 21.7000 I want = 21.70


Solution

  • Just try casting to (DT_NUMERIC,16,2), use the following expression:

    (DT_NUMERIC,16,2)ROUND([Column],2)
    

    Also you can try this:

    ROUND(((DT_NUMERIC)([Column])), 2)
    

    Or

    (DT_DECIMAL,2)[Column]