[AccessD] Query does not return all records

Kaup, Chester Chester_Kaup at kindermorgan.com
Wed Jan 12 11:08:21 CST 2011


The following query only returns 1046 records even though the table dbo_CompletionMaster has 2085 distinct records. What am I doing wrong? Thanks.

SELECT dbo_DSS_CompletionMaster.PID, dbo_DSS_CompletionMaster.Well_Number, Last(dbo_DSS_StatusChanges1.StatusDate) AS LastOfStatusDate
FROM dbo_DSS_StatusChanges1 RIGHT JOIN dbo_DSS_CompletionMaster ON dbo_DSS_StatusChanges1.PID = dbo_DSS_CompletionMaster.PID
GROUP BY dbo_DSS_CompletionMaster.PID, dbo_DSS_CompletionMaster.Well_Number
HAVING (((Last(dbo_DSS_StatusChanges1.StatusDate))<#1/1/2001#));


Chester Kaup

Engineering Technician

Kinder Morgan CO2 Company, LLP

Office (432) 688-3797

FAX (432) 688-3799





No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.




More information about the AccessD mailing list