Friday, March 15, 2013

Currency Format with comma's in SQL Server-2008

Posted by Rahul Kharde at 3:41 AM

Sometimes you want to have your money fields properly formatted with commas like this: 10,000,000.34


DECLARE @amount AS DECIMAL
SET @amount=11000000
SELECT CONVERT(VARCHAR,CAST(@amount AS MONEY),-1) AS 'Amount'

Output

 


If you enjoyed this post and wish to be informed whenever a new post is published, then make sure you subscribe to my regular Email Updates. Subscribe Now!


Kindly Bookmark and Share it:

YOUR ADSENSE CODE GOES HERE

0 comments:

Have any question? Feel Free To Post Below:

 

Popular Posts

Recent Comments

© 2011. All Rights Reserved | Help to understand .Net | Template by Blogger Widgets

Home | About | Top