I want to round up a number but CEILING
rounds to first integer. I also tried adding 0.005 but this rounds up the ones under 0.005.
I want to round up if the 3rd decimal is 5 or higher...
please try these numbers before posting your solution
5.085 --> 5.09
15.085 --> 15.09
110.4646 --> 110.46
110.4656 --> 110.47
My Code :
DECLARE @i float
SET
@i = 5.085
SELECT
ROUND(@i, 1) AS [Result 1],
ROUND(@i, 2) AS [Result 2],
ROUND(@i, 3) AS [Result 3]
result is
Expected result 2 is 5.09 when 3rd decimal is 5 or higher...