I have following select command (round/truncate):
--RoundSELECT ROUND(100.55555552, 2)--TruncateSELECT ROUND(100.55555552, 2, 1)
Both giving trailing zeros
How we can remove trailing zeros?
Use following:
--RoundSELECT convert(DOUBLE PRECISION, ROUND(100.55555552, 2))--TruncateSELECT convert(DOUBLE PRECISION, ROUND(100.55555552, 2, 1))
try this
--RoundSELECT CAST(ROUND(100.55555552, 2) AS DECIMAL(8,2))--TruncateSELECT CAST(ROUND(100.55555552, 2, 1) AS DECIMAL(8,2))