I have a query for round up for my stored procedure like this
DECLARE @number int;
SET @number = 918750;
SELECT @number + (100 - @number % 100 )
This returns 918800
The correct value to be returned would be 918,800.
But in case @number = 918800 it will change into 918900.
And I want only 2 last digit is round up.
Can I change it into single query only?
Yes if I use
SELECT ROUND(918750 , -2) AS RoundValue;
it return 918800, but if i use
SELECT ROUND(918740 , -2) AS RoundValue;
it return 918700, while i need is always round to up so the result i need is 918000