![]() |
|
Archives of the TeradataForumMessage Posted: Tue, 14 Sep 2004 @ 12:28:31 GMT
One Calculation different Results, What is this magic of Teradata? Teradata
SELECT 6*393.2600*1.57000*(10/60.00) Res
Result : 629.76656400000
SELECT 6*393.2600*1.57000*(CAST(10 AS DECIMAL(18,6))/60.00) Res
Result : 617.419434836400000
SELECT 6*393.2600*1.57000*(CAST(10 AS FLOAT)/60.00) Res
Result : 617.418200000
Note : None of these give the results as given by the SQL Server. If any one gets the result as returned by any other databases please do let me know!!! SQL Server
SELECT 6*393.2600*1.57000*(10/60.00)
Result : 617.415730327200000
SELECT 6*393.2600*1.57000*((CAST(10 AS FLOAT))/60.00)
Result : 617.41819999999996
Calculator Result : 617.4182
Can anyone explain why we get an error when I do CAST with more than 6 decimal points for the above calculation?
SELECT 6*393.2600*1.57000*(CAST(10 AS DECIMAL(18,7))/60.00) Res - Gives an error
We had an existing SQL server system and we are migrating it to Teradata, we face an issue of 0.01 to 0.03 for each records and we have thousands/millions of records when we SUM these things imagine the difference? regards, Prasanna.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||