Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formating a money field in my select sentence
Message
 
 
To
10/11/2008 10:36:26
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01360904
Message ID:
01360917
Views:
7
>How can I format my money field output in my select sentence?

A frontend is better place to format data than SQL Server.
You can use 3rd parameter of the CONVERT() function if you've to do that in a query
DECLARE @ammount money
SET @ammount = 12345678.9157
SELECT @ammount,
		CONVERT(varchar(20),@ammount, 0),
		CONVERT(varchar(20),@ammount, 1),
		CONVERT(varchar(20),@ammount, 2)
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform