Senin, 14 Agustus 2017

[MS_AccessPros] Count query not returning correct numbers

 

I have the following query:


SELECT tblUnit.UnitCode, Count(tblHousehold.HouseholdID) AS CountOfHouseholdID
FROM (tblUnit INNER JOIN tblReExam ON tblUnit.UnitID = tblReExam.UnitID) INNER JOIN tblHousehold ON tblReExam.ReExamID = tblHousehold.ReExamID
GROUP BY tblUnit.UnitCode, tblHousehold.MemberType
HAVING (((tblHousehold.MemberType)="1" Or (tblHousehold.MemberType)="2"));


What I am trying to get is a total count of household members per Unit Code. Member Type = 1=Adult and 2 = Dependent. But this query is only return the adult count per unit. What am I missing?


Thank you,


Art Lorenzini

Sioux Falls, SD

__._,_.___

Posted by: dbalorenzini@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar