L
lynn atkinson
SELECT Count(employeeinfo.[employee id]) AS Expr1, employeeinfo.[employee
ID], progress.[candidate ID], progress.status, progress.[start date],
progress.award, employeeinfo.surname, employeeinfo.forename,
employeeinfo.title, employeeinfo.[post/role], employeeinfo.Project,
employeeinfo.locality, employeeinfo.[old contract]
FROM employeeinfo INNER JOIN (candidate INNER JOIN progress ON
candidate.[candidate number] = progress.[candidate ID]) ON
employeeinfo.[employee ID] = candidate.[employee ID]
WHERE (((progress.status)="working towards") AND ((progress.award)="care 4")
AND ((employeeinfo.[old contract])=False)) OR (((progress.status)="working
towards") AND ((progress.award)="management 4") AND ((employeeinfo.[old
contract])=False));
I have the query above and it is telling me that employee id is not part of
an aggregate function. As far as I can see it is - a count function. What am
I not understanding here?
Also, whilst I am here I want to count only unique employee ids ie if an
employee has qualifications care3 and care4. I only want to count that person
(employee id) once. How do I do this?
ID], progress.[candidate ID], progress.status, progress.[start date],
progress.award, employeeinfo.surname, employeeinfo.forename,
employeeinfo.title, employeeinfo.[post/role], employeeinfo.Project,
employeeinfo.locality, employeeinfo.[old contract]
FROM employeeinfo INNER JOIN (candidate INNER JOIN progress ON
candidate.[candidate number] = progress.[candidate ID]) ON
employeeinfo.[employee ID] = candidate.[employee ID]
WHERE (((progress.status)="working towards") AND ((progress.award)="care 4")
AND ((employeeinfo.[old contract])=False)) OR (((progress.status)="working
towards") AND ((progress.award)="management 4") AND ((employeeinfo.[old
contract])=False));
I have the query above and it is telling me that employee id is not part of
an aggregate function. As far as I can see it is - a count function. What am
I not understanding here?
Also, whilst I am here I want to count only unique employee ids ie if an
employee has qualifications care3 and care4. I only want to count that person
(employee id) once. How do I do this?