declare @Num numeric(8,7)set @Num = 0.0000001SET @Num = CASE WHEN CAST(@Num AS NUMERIC(3,2)) = @Num THEN @Num ELSE CAST(@Num AS NUMERIC(3,2)) + 0.01 ENDSELECT @Num

--with both numbers the user wanted to get 0.01select ROUND(0.0100000+.00499999,2,1)select ROUND(0.0000001+.00499999,2,1)

with TestData as (select datavaluefrom (values(5.0000016), -- should be 5.01(6.1000138), -- should be 6.11(7.1200073), -- should be 7.13(5.0000000), -- should be 5.00(6.1000000), -- should be 6.10(7.1200000) -- should be 7.12)dt(datavalue))select datavalue, (ceiling(datavalue * 100) * 1.0) / 100from TestData;

with TestData as (select datavaluefrom (values(5.0000016), -- should be 5.01(6.1000138), -- should be 6.11(7.1200073), -- should be 7.13(5.0000000), -- should be 5.00(6.1000000), -- should be 6.10(7.1200000) -- should be 7.12)dt(datavalue))select datavalue, (ceiling(datavalue * 100) * 1.0) / 100, -- Lynn's idea CASE WHEN (datavalue * 100) % 1 > 0 THEN ROUND(datavalue, 2, 1) + 0.01 ELSE ROUND(datavalue, 2, 1) END -- My ideafrom TestData;

with test_data_cte as(select datavaluefrom ( values (5.0000016), -- should be 5.01 (6.1000138), -- should be 6.11 (7.1200073), -- should be 7.13 (5.0000000), -- should be 5.00 (6.1000000), -- should be 6.10 (7.1200000) -- should be 7.12 ) dt (datavalue))select datavalue, rounded_datavalue = convert(numeric(8,2),round(datavalue+0.0049999,2))from test_data_cte

datavalue rounded_datavalue--------------------------------------- -----------5.0000016 5.016.1000138 6.117.1200073 7.135.0000000 5.006.1000000 6.107.1200000 7.12