Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Editing reports in SMS 2003

Status
Not open for further replies.

MISMCSA

MIS
Jun 24, 2004
43
0
0
US
I was wondering if any of you know how to sum a column in SQL. For example, If I have 2 platforms WinXP and Win2k and I have 2 unsuccessful patch installs for XP and 7 for 2k, then the total unsuccessful installs (9) would be totaled at the bottom of the column.

Thanks
 
The SQL syntax for what you have is SELECT whatever,SUM(number) FROM whatever_table GROUP BY whatever. I don't think there is a way to create a query to produce the grand total in addition to the detail. You can do one or the other with a SQL query. SQL, although a very nice relational database, isn't geared for reporting. That's why software such as Crystal makes so much money. My suggestion is to use something like Crystal to create nice, custom reports.

-If it ain't broke, break it and make it better.
 
Well I can add COMPUTE SUM(number), SUM(number) at the end of the initial query you are talking about and it will produce a grand total for the columns. So, there is a way to do it, it just doesn't look real clean. It'd be nice to format the table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top