Hi Guys
Query to give me total number of Competent calls for each Staff members. But the following query doesn't give me the right result..OutcomeID=1 means Competent call. I want to display the total competent calls for each staff.
Any help will be much appreciated.
Thanks
Query to give me total number of Competent calls for each Staff members. But the following query doesn't give me the right result..OutcomeID=1 means Competent call. I want to display the total competent calls for each staff.
Code:
SELECT tblstaff.[Staff Name], IIf([OutcomeID]=1,1,0) AS Total
FROM tblCallType INNER JOIN (tblstaff INNER JOIN tblAudit ON tblstaff.[Staff Number] = tblAudit.[Staff Number]) ON tblCallType.[Call TypeID] = tblAudit.[Call TypeID]
GROUP BY tblstaff.[Staff Name], IIf([OutcomeID]=1,1,0);
Any help will be much appreciated.
Thanks