jasimon9
asked on
Compute clause displays nothing in Enterprise Manager
I have a simple query with totals. Here is the query:
SELECT D.ManufacturerId, M.CompanyName, D.DatePaid, D.Amount
FROM PaidMfgDtl D INNER JOIN
dbo.Manufacturers M ON D.ManufacturerId = M.ManufacturerId INNER JOIN
dbo.Users U ON M.UserId = U.UserId
WHERE (D.DatePaid > GETDATE() - 1) AND (D.DatePaid < GETDATE() + 3)
ORDER BY D.DatePaid, D.ManufacturerId
COMPUTE SUM(d .amount)
The query executes normally in Query Analyzer and displays the totals as separate query results. However, in Enterprise Manager, only the main query is displayed. How do I get the COMPUTE clause queries to display in Enterprise Manager?
SELECT D.ManufacturerId, M.CompanyName, D.DatePaid, D.Amount
FROM PaidMfgDtl D INNER JOIN
dbo.Manufacturers M ON D.ManufacturerId = M.ManufacturerId INNER JOIN
dbo.Users U ON M.UserId = U.UserId
WHERE (D.DatePaid > GETDATE() - 1) AND (D.DatePaid < GETDATE() + 3)
ORDER BY D.DatePaid, D.ManufacturerId
COMPUTE SUM(d .amount)
The query executes normally in Query Analyzer and displays the totals as separate query results. However, in Enterprise Manager, only the main query is displayed. How do I get the COMPUTE clause queries to display in Enterprise Manager?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you want to copy and paste to Excel to include the column headings, this can also be done in Query Analyzer.
Before running your statement, go to Tools --> Options. Then go to Results. In the Defaul results target, select Results to Text. In the Results output format, select Tab Delimited. Then click Apply. Make sure the Print column headers is checked as well. Then run your query. You can then copy and paste the result to Excel.
Before running your statement, go to Tools --> Options. Then go to Results. In the Defaul results target, select Results to Text. In the Results output format, select Tab Delimited. Then click Apply. Make sure the Print column headers is checked as well. Then run your query. You can then copy and paste the result to Excel.
ASKER
Thanks for the tip. At this point, it appears that you have answered my original question so I am awarding points.
ASKER