Round Function in Derived column transformation

Last Post 31 Oct 2007 10:29 PM by SQLUSA. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
loveyaseen
New Member
New Member

--
31 Oct 2007 05:13 AM
Can somebody please help me with the implementation of a logic in round off to the left of a decimal point.
Something like this in excel "=ROUND(x/12*31%,-2)" is to be implemented in SSIS. The Round function in the derived column is not permitting -2 for the length parameter. Please help

Value x Excel SSIS
627900 16200 16221
187000 4800 4831
277760 7200 7175
763000 19700 19711
1387500 35800 35844
1465200 37900 37851
2725000 70400 70396
292800 7600 7564
317200 8200 8194

The table lists the values for X in the formula and the respective result calculated by Excel. I would want SSIS to give the same results like excel is giving. Please help me to make it work.
SQLUSA
New Member
New Member

--
31 Oct 2007 10:29 PM
I tried it with 0, it worked.

With -2, it gave errors at Edit time in the package designer.

Maybe you can do 100.0 * (ROUND (YourNumber/100.0,0)) ?

Kalman Toth, Database Architect
SQL Server 2005 Training - http://www.sqlusa.com/ssis/

You are not authorized to post a reply.

Acceptable Use Policy