Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Formating a money field in my select sentence
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01360904
Message ID:
01360958
Vues:
7
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform