Search code examples
sql-server-2005rounding

How to round with no trailing zeros in SQL Server 2005?


How to round with no trailing zeros in SQL Server 2005?

    select round(100.5555, 2)

...yields 100.5500. How to get rid of the zeros?


Solution

  • Try this

    select CAST(round(100.5555, 2) AS DECIMAL(8,2))