troubleshooting Question

Round Issues in SSIS Derived Column

Avatar of JeepGeekin
JeepGeekin asked on
Microsoft SQL Server
9 Comments1 Solution4858 ViewsLast Modified:
The Round expression function is not consistently rounding 5's up. In a Derived Column task, I am converting 3 decimal numbers to 2 decimals using the following expression:
(DT_DECIMAL,2)ROUND(ColumnName, 2).

I noticed it only has a prolem when handling 5's. Sometimes it round them up & sometimes it drops them.  Also, the Round SQL function rounds the values correctly. It's just the Round expression that does this. I thought it might have been a setting on the server telling it to use European, or crazy hedgehog rules for rounding.

So far the following Round up correctly:
23.015 = 23.02
11.475 = 11.48
67.915 = 67.92
32.135 = 32.14

The following do not round up correctly:
10.935 = 10.93
11.805 = 11.8
6.305 = 6.3
9.605 = 9.6
8.985 = 8.98
21.585 = 21.58

Does anyone know what the deal is? This should be pretty standard stuff.
ASKER CERTIFIED SOLUTION
Reza Rad
Consultant, Trainer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros