The following is my SQL:
Big and hairy? Yes, I know. But it's really not that bad. The problem that I seem to be having is that all records from qryAllAudits should display regardless of whether there is a record in qryAllDings, but this does not seem to be happening. What am I missing?
It is a Left Join, but it is acting like an Inner Join.
Code:
SELECT qryAllAudits.auditID, qryAllAudits.auditorName, qryAllAudits.auditDate, qryAllAudits.auditProvName, qryAllAudits.auditProvID, qryAllAudits.dateAuditRecd, qryAllAudits.dateRepCompleted, qryAllAudits.dateRepRecd, qryAllAudits.auditType, qryAllAudits.repAudited, qryAllAudits.delEntity, qryAllAudits.newHireAudit, qryAllAudits.markAsNoErrors, qryAllAudits.extraNotes, qryAllAudits.contactID, qryAllAudits.hideMe, qryAllDings.mainCatID, qryAllDings.mainCatSubCatID, qryAllDings.subCatID, qryAllDings.auditDingsID, qryAllDings.noLongerValid
FROM qryAllAudits LEFT JOIN qryAllDings ON qryAllAudits.auditID = qryAllDings.auditID
GROUP BY qryAllAudits.auditID, qryAllAudits.auditorName, qryAllAudits.auditDate, qryAllAudits.auditProvName, qryAllAudits.auditProvID, qryAllAudits.dateAuditRecd, qryAllAudits.dateRepCompleted, qryAllAudits.dateRepRecd, qryAllAudits.auditType, qryAllAudits.repAudited, qryAllAudits.delEntity, qryAllAudits.newHireAudit, qryAllAudits.markAsNoErrors, qryAllAudits.extraNotes, qryAllAudits.contactID, qryAllAudits.hideMe, qryAllDings.mainCatID, qryAllDings.mainCatSubCatID, qryAllDings.subCatID, qryAllDings.auditDingsID, qryAllDings.noLongerValid
HAVING (((qryAllDings.noLongerValid)<>True));
Big and hairy? Yes, I know. But it's really not that bad. The problem that I seem to be having is that all records from qryAllAudits should display regardless of whether there is a record in qryAllDings, but this does not seem to be happening. What am I missing?
It is a Left Join, but it is acting like an Inner Join.