Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: SSIS
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 22-Nov-12 20:57pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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 Smile | :)

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

  Print Answers RSS
0 OriginalGriff 381
1 Sergey Alexandrovich Kryukov 245
2 Marcin Kozub 225
3 Praneet Nadkar 217
4 /\jmot 189
0 OriginalGriff 8,284
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,614
3 Maciej Los 4,989
4 Manas Bhardwaj 4,986

Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 23 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100