Click here to Skip to main content
15,880,392 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello friends,
I'm importing data from excel and performing derived column on REV column before dumping the data in the destination table.

My problem is, suppose the column contains 6180.00 and I write expression in derived column as below
6180.00 / 1000

It gives me 6.17 as output

But if i try following in SQL Server
select 6180.00/1000

It gives me 6.1800000 as output

Can I know what is happening and why
What i want as final result is 6.18

Any idea how to do it?

Thanks in advance
Posted

1 solution

So what I did is, I would force SSIS to compute higher precision value and then ROUND it to the precision I want.
So following gave me required output

ROUND(((DT_DECIMAL,4)[REV]) / ((DT_DECIMAL,4)1000),2)


Hope this helps Yu :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900