Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Thousand separator?

Author  Topic 

msd1357
Starting Member

3 Posts

Posted - 2007-10-17 : 10:06:08
Hi,
How can I select a big numeric value that separated with comma?
Like this:
SELECT myInt from Table1
I want that return value would be like this:
----------------
176,262
73,632
283,873,323
----------------
regards..

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-10-17 : 10:10:55
why don't you do the formatting of numbers your front end ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-10-17 : 10:11:18
Look at "CAST & CONVERT" in Books Online, or let the front-end application format the value.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-10-17 : 10:32:00
quote:
Originally posted by msd1357

Hi,
How can I select a big numeric value that separated with comma?
Like this:
SELECT myInt from Table1
I want that return value would be like this:
----------------
176,262
73,632
283,873,323
----------------
regards..


Where do you want to show data?
If you use front end application, use format function there

Ex in VB6

Format(Rs("col"),"###,###")

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -