For the life of me I can't get this query to work, does anyone have an idea?
This particular data, I should have the following figures, but the Incomplete doesn't calculate. These figures are for work done on a particular day. The SLA MET & NOT MET figures don't need to match the RECEIVED, it's a coincedance (for this particular date) that they do.
12 RECEIVED - New Records
5 SLA MET
7 SLA NOT MET
4 INCOMPLETE
So here's the code.
SELECT tblClaims.RecDate, Count(*) AS Received,
Sum(IIf(ProcessDays Between 1 And 3,1,0)) AS [SLA MET],
Sum(IIf(ProcessDays>3,1,0)) AS [SLA NOT MET],
Sum(IIf(ProcessDays<1,1,0)) AS [INCOMPLETE]
FROM tblClaims
WHERE (((tblClaims.RecDate)= #9/26/2007#)
AND ((tblClaims.CompDate) Not Between "#01/09/2007#" And "#30/09/2007#"))
GROUP BY tblClaims.RecDate
ORDER BY tblClaims.RecDate;
and the IMCOMPLETE section is where it's not counting.
Thanks in advance,
Jon
This particular data, I should have the following figures, but the Incomplete doesn't calculate. These figures are for work done on a particular day. The SLA MET & NOT MET figures don't need to match the RECEIVED, it's a coincedance (for this particular date) that they do.
12 RECEIVED - New Records
5 SLA MET
7 SLA NOT MET
4 INCOMPLETE
So here's the code.
SELECT tblClaims.RecDate, Count(*) AS Received,
Sum(IIf(ProcessDays Between 1 And 3,1,0)) AS [SLA MET],
Sum(IIf(ProcessDays>3,1,0)) AS [SLA NOT MET],
Sum(IIf(ProcessDays<1,1,0)) AS [INCOMPLETE]
FROM tblClaims
WHERE (((tblClaims.RecDate)= #9/26/2007#)
AND ((tblClaims.CompDate) Not Between "#01/09/2007#" And "#30/09/2007#"))
GROUP BY tblClaims.RecDate
ORDER BY tblClaims.RecDate;
and the IMCOMPLETE section is where it's not counting.
Thanks in advance,
Jon