I'm on SQL Server 2005, and I am trying to figure out a rounding issue with smallmoney data types.
For example, the value 1.2849, when rounded to 2 decimal places, produces 1.28, but shouldn't it produce 1.29? e.g. 9 rounds up for 1.285, 5 rounds up for 1.29.
Here is the example:
SELECT
'CAST(1.2849 AS SMALLMONEY)' OPERATION, CAST(1.284948 AS SMALLMONEY) RESULT
UNION
SELECT
'ROUND(CAST(1.2849 AS SMALLMONEY), 2)', ROUND(CAST(1.284948 AS SMALLMONEY), 2)
UNION
SELECT
'ROUND(ROUND(CAST(1.2849 AS SMALLMONEY), 3), 2)', ROUND(ROUND(CAST(1.2849 AS SMALLMONEY), 3), 2)