COMPUTE is for backwards compatibility. Perhaps ROLLUP will do what you want? Instead of returning the data in a seperate resultset, it'll be part of the normal resultset -- you can identify the ROLLUP rows by checking GROUPING(<field you're grouping by>) = 1. ROLLUP will only work as long as you're not wanting to group any calculations -- it doesn't like that too much, and if that's your intention, you're probably just best off writing your own extra query to do so.
Here's an example from the Northwind db:
Code:
SELECT CASE WHEN GROUPING(CustomerID) = 1 THEN 'ALL' ELSE CustomerID END AS CustomerID, CASE WHEN GROUPING(LastName) = 1 THEN 'ALL' ELSE LastName END AS Employee, COUNT(*)
FROM Orders
INNER JOIN Employees ON Orders.EmployeeID = Employees.EmployeeID
GROUP BY CustomerID, LastName WITH ROLLUP