.Net Logics
Pages
Home
About Us
Wednesday, 3 April 2013
Currency Format with comma's in SQL Server-2008
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
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment