Running Total Help

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

Guest

A mate of mine posted a question recently but had a bit of difficulty so
let's give this a shot. I am building this as a subquery to hopefully make it
easier as the original had FTE as a calculation as opposed to an actual data
field. Clear as mud? I've done similar before but can't seem to get it going
this time around.

What we would like is to get a running total of the field FTE for this query:

SELECT [FTE-SVTRA].[Employee Name], [FTE-SVTRA].FTE
FROM [FTE-SVTRA];

Thanks for your time.
 
OShea:

Consider a strategy from Access Hacks by O'Reilly, Hack #43.

SELECT FTE-SVTRA.Employee Name, FTE-SVTRA.Employee No, FTE-SVTRA.FTE
FROM FTE-SVTRA
UNION ALL SELECT "Total" AS cEmployee Name, "Total" AS Employee No,
Sum(FTE-SVTRA.FTE) as SumofFTE
FROM FTE-SVTRA
ORDER BY FTE-SVTRA.Employee No;

This is a union query which will 'append' the running total of all FTE for
all Employees. If you use the Order By clause it will cause the 'Total' row
to appear as the last row of your data.

Seth Schwarm
 
Thanks for the response. But it is telling me it is missing an operator when
I try to run it.

Seth Schwarm said:
OShea:

Consider a strategy from Access Hacks by O'Reilly, Hack #43.

SELECT FTE-SVTRA.Employee Name, FTE-SVTRA.Employee No, FTE-SVTRA.FTE
FROM FTE-SVTRA
UNION ALL SELECT "Total" AS cEmployee Name, "Total" AS Employee No,
Sum(FTE-SVTRA.FTE) as SumofFTE
FROM FTE-SVTRA
ORDER BY FTE-SVTRA.Employee No;

This is a union query which will 'append' the running total of all FTE for
all Employees. If you use the Order By clause it will cause the 'Total' row
to appear as the last row of your data.

Seth Schwarm





OShea said:
A mate of mine posted a question recently but had a bit of difficulty so
let's give this a shot. I am building this as a subquery to hopefully make it
easier as the original had FTE as a calculation as opposed to an actual data
field. Clear as mud? I've done similar before but can't seem to get it going
this time around.

What we would like is to get a running total of the field FTE for this query:

SELECT [FTE-SVTRA].[Employee Name], [FTE-SVTRA].FTE
FROM [FTE-SVTRA];

Thanks for your time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top