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 2000 Forums
 Import/Export (DTS) and Replication (2000)
 formatting numeric output

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-01-28 : 08:17:33
casey writes "I create a number of queries that report sales data for our company. I format these for Excel by selecting the tab-key value as part of the select statement:

select location + char(9) + (sales - credits) + char(9) + year;

and then saving the file with a .xls extension.

My boss would so love to have these formatted as whole numbers with commas:

AU 150,000 2004
AU 125,000 2003
BT 225,220 2004

but the only way I could figure out how to get these into Excel is to convert the numeric values to char values, which removes numeric formatting.

Does anyone have any ideas?

Thanks,
Casey"
   

- Advertisement -