MrDix
Honor Courage Commitment
- Local time
- Yesterday, 21:45
- Joined
- Apr 22, 2005
- Messages
- 10
Hi, I am using the code below to get the right count of Cases (records) for each agent.
SELECT tblCase.Agent, Count(*) AS pkCaseID
FROM tblCase
GROUP BY tblCase.Agent;
it works fine: I have 8 Cases (records)
My results are:
Eric = 2
Luis = 2
Carlos = 1
Tammy = 1
Nancy = 2
Now, My Issues is I wanted to group this monthly, so I can get a Monthly Report. Showing my agents total for each month.
Something like this is what I trying to achive:
JUNE 2005
Eric = 2
Luis = 1
Carlos = 1
JULY 2005
Luis = 1
Tammy = 1
Nancy = 2
Still showing the right amount of cases by seperated by month.
So I added the following code.
SELECT tblCase.Agent, Count(*) AS pkCaseID, tblCase.StartDate
FROM tblCase
GROUP BY tblCase.Agent, tblCase.StartDate;
But I get this instead:
June 2005
Eric = 1
Eric = 1
Luis = 1
Carlos = 1
July 2005
Luis = 1
Tammy = 1
Nancy = 1
Nancy = 1
Anyone can help my with this, point me to the right direction??
Thanks in advance.
SELECT tblCase.Agent, Count(*) AS pkCaseID
FROM tblCase
GROUP BY tblCase.Agent;
it works fine: I have 8 Cases (records)
My results are:
Eric = 2
Luis = 2
Carlos = 1
Tammy = 1
Nancy = 2
Now, My Issues is I wanted to group this monthly, so I can get a Monthly Report. Showing my agents total for each month.
Something like this is what I trying to achive:
JUNE 2005
Eric = 2
Luis = 1
Carlos = 1
JULY 2005
Luis = 1
Tammy = 1
Nancy = 2
Still showing the right amount of cases by seperated by month.
So I added the following code.
SELECT tblCase.Agent, Count(*) AS pkCaseID, tblCase.StartDate
FROM tblCase
GROUP BY tblCase.Agent, tblCase.StartDate;
But I get this instead:
June 2005
Eric = 1
Eric = 1
Luis = 1
Carlos = 1
July 2005
Luis = 1
Tammy = 1
Nancy = 1
Nancy = 1
Anyone can help my with this, point me to the right direction??
Thanks in advance.