column totals

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In query; how do I get column totals. I can get get group
totals say by quarter. But how do I total all four
quarters.

QTR1 1000
QTR2 2000
QTR3 3000
QTR4 4000

TOTAL 10000
 
This would require two queries in a UNION query. Something like the following
might work

SELECT Quarter, Amount
FROM Table1
UNION ALL
SELECT "TOTAL", Sum(Amount)
FROM Table1
ORDER BY Quarter

If you are doing this for a report, then you can use the reports grouping
function to do this without using the complex query. You would just add a
control to the group footer and set its control source to =Sum(Amount)
 
Back
Top