Assuming all values are positive, here is one approach:
update t
set SalesPrice = (case when SalesPrice >= 100 then floor(SalesPrice) + 1
when SalesPrice < 100 then floor(SalesPrice) + 0.95
end)
where (SalesPrice - floor(SalesPrice)) >= 0.9;
I added the where
clause so this only affects prices where the decimal amount is greater than 0.90. That way, prices like 15.49
are not affected. You can adjust this to your needs. If you wanted to affect all prices with decimal values, then:
update t
set SalesPrice = (case when SalesPrice >= 100 then floor(SalesPrice) + 1
when SalesPrice < 100 then floor(SalesPrice) + 0.95
end)
where SalesPrice > floor(SalesPrice);
The where
clause guarantees that there is a decimal amount. This prevents 21
from turning into 21.95
for instance.