showing Null rows in Count

J

Judy

okay I have a query that works fine, except I need to also
show the rows of Ethnic ID's with a count of zero or null.

How do I add that?

Here's the query:

SELECT tblClientInfo.ysnHispanic,
tclClientInfo.strEthnicID, Count
(tblClientInfo.strEthnicID) AS CountOfstrEthnicID
FROM tblEthnicity INNER JOIN tblClientInfo ON
tblEthnicity.EthnicID - tblClientInfo.strEthnicID
GROUP BY tblClientInfo.ysnHispanic,
tblClientInfo.strEthnicID;

thanks,

Judy
 
J

John Vinson

okay I have a query that works fine, except I need to also
show the rows of Ethnic ID's with a count of zero or null.

How do I add that?

Here's the query:

SELECT tblClientInfo.ysnHispanic,
tclClientInfo.strEthnicID, Count
(tblClientInfo.strEthnicID) AS CountOfstrEthnicID
FROM tblEthnicity INNER JOIN tblClientInfo ON
tblEthnicity.EthnicID - tblClientInfo.strEthnicID
GROUP BY tblClientInfo.ysnHispanic,
tblClientInfo.strEthnicID;

Change the INNER JOIN to a LEFT JOIN.
 

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