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 |
|
BigJim_Jax
Starting Member
3 Posts |
Posted - 2005-06-09 : 08:09:12
|
| Seems like the simplest questions, but I need a way to display a money data type field in the format:$ 999,999,990.00Specifically when returning the results in query analyzer from a simple select query. I am familiar with casting the field to a string to get the 0.00, but don't know how to format the field with $ and comma separators.Any help is greatly appreciated. BigJim |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-06-09 : 08:13:48
|
| declare @m moneyset @m= 999999990select '$ ' +convert(varchar(20),@m,1)MadhivananFailing to plan is Planning to fail |
 |
|
|
JimL
SQL Slinging Yak Ranger
1537 Posts |
Posted - 2005-06-09 : 08:23:26
|
| Note: this is usually worried about on the front end and not at a development tool level.JimUsers <> Logic |
 |
|
|
BigJim_Jax
Starting Member
3 Posts |
Posted - 2005-06-09 : 08:43:03
|
quote: Originally posted by JimL Note: this is usually worried about on the front end and not at a development tool level.JimUsers <> Logic
Agreed, and usually I would prefer it be handled this way; however, the end result of this is to be utilized in a DTS export to an external vendor whom I do not massaging the data.Developer seemed to be the best forum for this since we usually are the people who deal with the presentational level. |
 |
|
|
BigJim_Jax
Starting Member
3 Posts |
Posted - 2005-06-09 : 08:47:17
|
quote: Originally posted by madhivanan declare @m moneyset @m= 999999990select '$ ' +convert(varchar(20),@m,1)MadhivananFailing to plan is Planning to fail
Perfect Madhivanan, worked like a charm!Thank You!!!! |
 |
|
|
|
|
|