Groups | Blog | Home
all groups > sql server mseq > july 2003 >

sql server mseq : how to split numbers to thousand digits ?


avni erbey
7/30/2003 7:20:17 AM
How can I split the numbers to thousand digits in SQL 2000?

SALES (FLOAT)

SELECT SALES FROM TOTALSALES
Result:
----------------------
416455455445.0
855855555.0

I need to see the result like this:
-----------------------
416,455,455,445.0
855,855,555.0

Anith Sen
7/30/2003 10:10:02 AM
Ideally, this should be done on your client application since, formatting is
a function of the software which displays it. In T-SQL you can do:

SELECT CONVERT(VARCHAR, CAST(Sales AS MONEY), 1)
FROM totalsales ;

--
- Anith
( Please reply to newsgroups only )

AddThis Social Bookmark Button