counting blank recordsets

M

Michael

I have an A2003 query that uses count(*) to return the number of reviews for
an employee. Works great if you have at least 1 review; chokes when you
don't have any reviews.
How can I return the empty recordset?

copy of sql included.

SELECT [tbl-Agents].AgentID, [HISTORY-Q].Department, [HISTORY-Q].[Emp Num],
[HISTORY-Q].ReviewMonth, Count(*) AS [#AR]
FROM [tbl-Agents] LEFT JOIN [HISTORY-Q] ON [tbl-Agents].AgentID =
[HISTORY-Q].[Emp Num]
GROUP BY [tbl-Agents].AgentID, [HISTORY-Q].Department, [HISTORY-Q].[Emp
Num], [HISTORY-Q].ReviewMonth
HAVING ((([HISTORY-Q].ReviewMonth)='October') AND ((Count(*))<10));
 
M

Michael

same results if I remove the tbl-Agents.
What I am looking for is a rs like
12345 Customer Service John Doe October 9
67892 Accounting Janice Smith October 0
23478 Quality Charles Doe October 7
....
....

Thanks in advance,
Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top