S
scubadiver
I have a number of fields with absence information and calculated the total.
I want to calculate [Abs_PH] as a percentage of the total. Here is a
simplified SQL
SELECT tble_employee.WorkStat, tble_week.Period, tble_hrs.Dept,
Sum(tble_hrs.Abs_PH) AS [Paid Hol],
Sum([Abs_PH]+[Abs_PSL]+[Abs_MA]+[Abs_Train]+[Abs_CL]+[Abs_SPL]+[Abs_UPH]+[Abs_USL]) AS Total
FROM tble_week INNER JOIN (tble_employee INNER JOIN tble_hrs ON
tble_employee.EmployeeID = tble_hrs.EmployeeID) ON tble_week.RecWk =
tble_hrs.RecWk
GROUP BY tble_employee.WorkStat, tble_week.Period, tble_hrs.Dept;
I want to calculate [Abs_PH] as a percentage of the total. Here is a
simplified SQL
SELECT tble_employee.WorkStat, tble_week.Period, tble_hrs.Dept,
Sum(tble_hrs.Abs_PH) AS [Paid Hol],
Sum([Abs_PH]+[Abs_PSL]+[Abs_MA]+[Abs_Train]+[Abs_CL]+[Abs_SPL]+[Abs_UPH]+[Abs_USL]) AS Total
FROM tble_week INNER JOIN (tble_employee INNER JOIN tble_hrs ON
tble_employee.EmployeeID = tble_hrs.EmployeeID) ON tble_week.RecWk =
tble_hrs.RecWk
GROUP BY tble_employee.WorkStat, tble_week.Period, tble_hrs.Dept;