Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formating a money field in my select sentence
Message
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01360904
Message ID:
01360958
Views:
8
Amount has one 1 m in it :)

>>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)
>
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform