Changing data format | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Changing data format

If I have data coming in — example: 12.345
Is it possible to round out the number? "12"? [8] thanks The
Bugster
SELECT CAST(ROUND(12.123, 0) AS INT) should do the trick! Have a look at ROUND, FLOOR and CEILING in BOL. If you get rid of the CAST as INT, you will get 12.000 ‘I reject your reality and substitute my own’ – Adam Savage
I guess I didnt look at BOL enough……Thanks The
Bugster
]]>