Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2002 In a query I count t

Status
Not open for further replies.

Delboy14

Programmer
Jun 21, 2001
213
GB
Access 2002

In a query I count the number of patients from each doctors surgery that fail a certain criteria. This works correclty displaying a count of the patients from each practice who fail. The problem I have is that very few people ever fail this, is there a way to display a zero for each practice who has no patients failing this criteria

the sql for the query is shown below;
Code:
SELECT Count(ConsultsQueryLast.PatientIndex) AS NumberOfPatients, ConsultsQueryLast.PracticeID
FROM ConsultsQueryLast
WHERE (ConsultsQueryLast.Drug18 <> &quot;&quot;)AND ConsultsQueryLast.Drug19 Is Null) AND ConsultsQueryLast.Drug12 Is Null)
GROUP BY ConsultsQueryLast.PracticeID;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top