Hi All,
Basically, I have 6 directors in my departments table and the query above only gives me the sum of one of the directors in my query. I am trying to sum all of the records with director "x", making sure that the directors is the same as the ones in the departments table.
If you need any more explanation, I'm currently online.
Thanks for your help!
Code:
SELECT DISTINCTROW Departments.Director, Sum([Absenteeism 2011].Sick1) AS Sick1, Sum([Absenteeism 2011].Sick2) AS Sick2, Sum([Absenteeism 2011].Sick3) AS Sick3, Sum([Absenteeism 2011].Sick4) AS Sick4, Sum([Absenteeism 2011].Sick5) AS Sick5, Sum([Absenteeism 2011].Sick6) AS Sick6, Sum([Absenteeism 2011].Sick7) AS Sick7, Sum([Absenteeism 2011].Sick8) AS Sick8, Sum([Absenteeism 2011].Sick9) AS Sick9, Sum([Absenteeism 2011].Sick10) AS Sick10, Sum([Absenteeism 2011].Sick11) AS Sick11, Sum([Absenteeism 2011].Sick12) AS Sick12, Sum([Absenteeism 2011].Sick13) AS Sick13, Sum([Absenteeism 2011].Sick14) AS Sick14, Sum([Absenteeism 2011].Sick15) AS Sick15
FROM Departments INNER JOIN [Absenteeism 2011] ON (Departments.[Department Name] = [Absenteeism 2011].Department) AND (Departments.Director = [Absenteeism 2011].Director)
GROUP BY Departments.Director;
Basically, I have 6 directors in my departments table and the query above only gives me the sum of one of the directors in my query. I am trying to sum all of the records with director "x", making sure that the directors is the same as the ones in the departments table.
If you need any more explanation, I'm currently online.
Thanks for your help!