I am trying to display a number with commas in an SQL Server 2000 View. I've read several solutions on various websites, but none are working for me.
Desired output: 1,234,567 (I don't want any decimal places).
I have tried:
REPLACE(CONVERT(VARCHAR(20), CAST(ROUND(dbo.table1.area, 0) AS MONEY), 1), '.00', '')
But I keep getting an SQL Server Enterprise Manager error window with "Data type error in expression".
REPLACE(cast (CONVERT(VARCHAR(20), CAST(ROUND(dbo.table1.area, 0) AS MONEY), 1) as VARCHAR, '.00', '')
with the same result. Geez, it was so easy in Cobol !!!!!!