By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,665 Members | 1,513 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,665 IT Pros & Developers. It's quick & easy.

MS SQL 2000 formatting numeric value to money

P: n/a
How to formatting numeric value like 20,5 to money value like 20,50 USD
using MS SQL server 2000
regards IJKK
Nov 8 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Jarosław Kozik (jk****@op.pl) writes:
How to formatting numeric value like 20,5 to money value like 20,50 USD
using MS SQL server 2000
replace(ltrim(str(@val, 17, 2)), '.', ',') + ' USD'

But you are really better off doing this client-side where you can format
to the client's regional settings etc.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Nov 8 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.