Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
isanlu
Starting Member
7 Posts |
Posted - 2005-01-19 : 13:58:47
|
| Hi thereI have a fairly complex SQL statement that uses the Compute Statement to bring back totals for sales. Is there a way to format the results so that it shows the Dollar Sign and only two decimalsThanks |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2005-01-19 : 15:04:09
|
| you could convert to varChar through money with a "style":declare @n floatset @n = 19875647834.9483654SElect '$' + convert(varChar(30), convert(money, @n), 0) [no comma] ,'$' + convert(varChar(30), convert(money, @n), 1) [comma] |
 |
|
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2005-01-19 : 15:51:26
|
| Soon someone will come and say that this is a client thing. |
 |
|
|
|
|
|