Hi,
How do I format the number below in(tenths, hundredths) ?
143497854.6700
Thanks
Hi,
How do I format the number below in(tenths, hundredths) ?
143497854.6700
Thanks
DECLARE @Number DECIMAL(14,4) = 143497854.6700;
SELECT @Number AS Number
SELECT ROUND(@Number,-1)
SELECT ROUND(@Number,-2)
SELECT CONVERT(INT,ROUND(@Number,-1))
SELECT CONVERT(INT,ROUND(@Number,-2))
SELECT CONVERT(INT,ROUND(CEILING(@Number),-1))
SELECT CONVERT(INT,ROUND(FLOOR(@Number),-1))