Good afternoon all,
I am currently working with a database that stores (among other things) the number of interventions for each admission. When running a simply query to count the number of interventions per admission, everything works except that it omits admissions where no interventions took place. I would like the query to return zero values as well, but cannot seem to get the database to do so. Here is the SQL statement from the simple query that I created in the wizard:
SELECT tblAdmissions.AdmissionID, Count(tblInterventions.IntType) AS CountOfIntType
FROM tblAdmissions INNER JOIN tblInterventions ON tblAdmissions.AdmissionID = tblInterventions.AdmissionID
GROUP BY tblAdmissions.AdmissionID;
I tried replacing "Count(tblInterventions.IntType)" with "Nz(Count(tblInterventions.IntType),0)" to no avail. Any help with this will be greatly appreciated!