I have an odd issue. I am rounding an expression in a view in SQL Server 2000. It keeps rounding the 5's down instead of rounding them up. The issue is really ghosty and behaves strangely. Here is the example of why it is so strange:
When running the following: (The numbers .0825 and 1090 are really table column references, but are replaced here with values for easier discussion)
SELECT ROUND((CAST(.0825 AS FLOAT(10, 4)) + 1) * CAST(1090 AS Float(10, 4)), 2)
I get the answer: 1179.92.
Now, if I run the following:
I get the answer 1179.93.
The second answer would obviously be the correct arith. method of rounding 1179.925. I want the outcome of 1179.93, so I need to alter the first query. The problem with this is that the values that are being pulled by the query require all of those Cast functions to properly format the input for the calculation.
Why is this a problem? I understand bank rounding and all of that garbage, but why is the Round() function doing different things with the same inputs?