Counting Zeros with A Criteria

jrock76

New member
Local time
Yesterday, 22:17
Joined
Jun 13, 2006
Messages
5
Hello,

I'm having a problem that I can't seem to solve. I am using A Master Client Table, which holds all the information of all the clients. I also have many different tables joined to this that have information such as gender,insurance, how they were reffered,ect., so that the data can be entered easier.

Right now I have queries set up to count how many clients have each of these things, and if there is no client with one of the insurances or ways of refferal it will count a zero.

For example -Insurance Types :3- Independant Health, 3 Blue Cross, 0-Community Blue and 5-Medicare. It counts the zeros fine right now, but if I enter some criteria such as a Date Range or if the person is an active client, it stops reading the zeros and I don't understand why this happens.

Here is my SQL of what I have so far:

SELECT [tblCodes-Insurance].InsuranceCode AS Insurance, Count([tblMaster-Client].ClientID) AS [Count]
FROM [tblCodes-Insurance] LEFT JOIN [tblMaster-Client] ON [tblCodes-Insurance].InsuranceCode = [tblMaster-Client].InsuranceCode
GROUP BY [tblCodes-Insurance].InsuranceCode
ORDER BY [tblCodes-Insurance].InsuranceCode;

I Really Appreciate any help that can be given
 

Users who are viewing this thread

Back
Top Bottom