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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Format Currency

Author  Topic 

sross81
Posting Yak Master

228 Posts

Posted - 2008-05-28 : 14:30:13
How do I get data that looks like 200,000 returned as a currency format?

Here is what I have in my select statement it doesn't work and can't seem to find an example that works or maybe I just have it set up wrong?

'$' + convert(Sum(OrderHeader.SubTotal)as money) as 'Total Sales'

Ultimately I have a field that is returned and it exists on a reporting services report. I can't find a way just to format the field as currency through the properties either would that be the better way to do it if there is a way?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-05-28 : 14:32:20
You should format your data in the report and not in SQL Server. Reporting Services uses VB.NET as the programming language. Check this: http://msconline.maconstate.edu/tutorials/VBNET/VBNET01/vbnet01-08.aspx

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx
Go to Top of Page

sross81
Posting Yak Master

228 Posts

Posted - 2008-05-28 : 14:33:03
Thanks just wanted to say I ended up finding it right after I posted.... :)
Go to Top of Page
   

- Advertisement -