0 pts.
 Returning Multiple result sets to Excel
I need to return a full result set including a number of Sum(s) Max(s) etc to an excel spreadsheet (don't ask why) from a Stored procedure on MS SQL2000. Problem is that Xcel can only handle a single result set per sheet... Any Ideas?

Software/Hardware used:
ASKED: March 7, 2005  5:14 PM
UPDATED: March 8, 2005  9:24 AM

Answer Wiki:
Create a temp table in the SP, populate it with the results of the query, then append the sum's etc. You may have to add a dummy column or two that will be populated by the sum's but not by the query. Then do a final SELECT * FROM temp table, kill the temp table and exit.
Last Wiki Answer Submitted:  March 7, 2005  5:30 pm  by  Prbailey   0 pts.
All Answer Wiki Contributors:  Prbailey   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Have you tried returning the full result table to Excel, then creating the Sum() and Max() results in a pivot table.

 0 pts.