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 2008 Forums
 Transact-SQL (2008)
 Format number thousands separator with point

Author  Topic 

cms9651
Starting Member

28 Posts

Posted - 2012-08-13 : 13:19:58
Hi there, I need your help.

I have this number in my database output result of query:
1013473

I need this output: 1.013.473

Can you help me?
Thanks in advance.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-08-13 : 13:31:54
why not do this at front end?

If front end is reporting services use =Format() function

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

cms9651
Starting Member

28 Posts

Posted - 2012-08-14 : 02:55:14
in GridView page ASP NET ?
Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-08-14 : 07:21:14
You can use a custom format string - see here for documentation and examples: http://msdn.microsoft.com/en-us/library/0c899ak8(v=vs.100).aspx

All the examples show using comma-separator, but it should work just the same if you use periods. (I am making that assertion without actually testing).
Go to Top of Page

cms9651
Starting Member

28 Posts

Posted - 2012-08-14 : 13:33:09
excellent, thank you
Go to Top of Page
   

- Advertisement -