all groups > sql server odbc > march 2006 >
You're in the

sql server odbc

group:

Convert VARCHAR to money value


Convert VARCHAR to money value Woodies_46 NO[at]SPAM hotmail.com
3/7/2006 8:32:18 PM
sql server odbc: Ok i know this is simple but i just don't know the syntax. What I have
is a bunch of values and i want to be able to display them as money
values with a $ in front.

eg.

16000000
1000
160000

TO THIS

$16,000,000.00
$1000.00
$16,000.000


I'm using MS SQL 2000

Cheers
Re: Convert VARCHAR to money value ranjitjain via SQLMonster.com
3/8/2006 5:35:36 AM
I guess it's not straight forward by just using convert function to change
datatype to money.
You need to write a function which will append $ and will separate thousands
with comma.

[quoted text, click to view]

--
Message posted via SQLMonster.com
Re: Convert VARCHAR to money value Paul Buxton
4/22/2006 12:00:00 AM
[quoted text, click to view]


Ideally, this formatting would be done in your front-end application (or
reporting tool), rather than being formatted by SQL.
AddThis Social Bookmark Button