Access2002
I have a query which counts the number of patients on a certain drug, it returns a count of the number of patients on this drug per doctors practice. This works fine except, I would like it to display 0 for practices that have no patients on the drug, this is my current code and the table displayed, does anyone know what to add, thankyou
NumOfPAtients PracticeID
4 {404DUND}
2 {123ABER}
I have a query which counts the number of patients on a certain drug, it returns a count of the number of patients on this drug per doctors practice. This works fine except, I would like it to display 0 for practices that have no patients on the drug, this is my current code and the table displayed, does anyone know what to add, thankyou
Code:
SELECT Count(ConsultsQueryLast.PatientIndex) AS NumOfPatients, ConsultsQueryLast.PracticeID
FROM ConsultsQueryLast, FailureLastConsult
WHERE (ConsultsQueryLast.Drug2<>"") AND FailureLastConsult.PatientIndex=ConsultsQueryLast.PatientIndex
GROUP BY ConsultsQueryLast.PracticeID;
NumOfPAtients PracticeID
4 {404DUND}
2 {123ABER}