I am using the following to create a comma formatted number in T-SQL. How can I get rid of the decimal point and the digits after decimal. So if I get 1,112.00 after formatting, how would I get only 1,112?
SELECT CONVERT(varchar, CAST(1112 AS money), 1)
This also works with digits after the decimal point:
Note: as @Mahmoud Gamal points out, formatting is often more suited to be performed in the front-end.