General information
Forum:
Microsoft SQL Server
Title:
Converting money to char
Hi,
I would like to convert a money data type to character WITH the '$' and any commas.
I saw this in "SQL Server Books Online" help.
"For example, the following CAST function converts the numeric value of $157.27 into a character string of '$157.27':
CAST ( $157.27 AS VARCHAR(10) ) "
Now I tried it, but I don't get a string of '$157.27', I get '157.27'. Is this a typo on the help or I need to set some kind of setting? Is there a way to include the $ and commas other than writing my own character parsing function to put them in there?
Thanks.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only