Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Formating a money field in my select sentence
Message
 
 
À
10/11/2008 10:36:26
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:
01360917
Vues:
8
>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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform