S
scubadiver
I have a group totals query with the following
Period (group by)
Week (group by)
Dept (group by)
Hours (Sum)
Absence (sum)
I want to create a cumulative sum for the "hours" and "absence" grouped by
"period", "week" and "dept". Here is the SQL.
SELECT tble_week.Period, tble_hrs.RecWk, tble_hrs.Dept,
Sum(tble_hrs.HrsWrk_basic) AS Hours, Sum(tble_hrs.AbsTot) AS Absence
FROM tble_week INNER JOIN tble_hrs ON tble_week.RecWk = tble_hrs.RecWk
GROUP BY tble_week.Period, tble_hrs.RecWk, tble_hrs.Dept
HAVING (((tble_hrs.Dept)<>"Operations"))
ORDER BY tble_week.Period, tble_hrs.RecWk;
Cheers.
Period (group by)
Week (group by)
Dept (group by)
Hours (Sum)
Absence (sum)
I want to create a cumulative sum for the "hours" and "absence" grouped by
"period", "week" and "dept". Here is the SQL.
SELECT tble_week.Period, tble_hrs.RecWk, tble_hrs.Dept,
Sum(tble_hrs.HrsWrk_basic) AS Hours, Sum(tble_hrs.AbsTot) AS Absence
FROM tble_week INNER JOIN tble_hrs ON tble_week.RecWk = tble_hrs.RecWk
GROUP BY tble_week.Period, tble_hrs.RecWk, tble_hrs.Dept
HAVING (((tble_hrs.Dept)<>"Operations"))
ORDER BY tble_week.Period, tble_hrs.RecWk;
Cheers.