S
shadowsong
I would like to generate a list of dealers, with date of last claim
for those who have submitted any, and either N/A or null for those who
have not submitted valid entries.
There are 341 records in my dealer table, but the query only returns
the 227 who have submitted claims, not any of the others. I assumed
originally that it was because I was using an inner join when I should
have been using a left join, but either join type returns the same
number of records.
SELECT tblAWSC.DLRNUM, tblAWSC.DLRNAME, Max([All Claims].DATE) AS
[MOST RECENT]
FROM tblAWSC LEFT JOIN [All Claims] ON tblAWSC.DLRNUM = [All
Claims].DLRNUM
WHERE (([All Claims].DLRNUM=[tblAWSC].[DLRNUM])
AND ([All Claims].APPROVED<>"N")
AND ([All Claims].TOTAL<>0))
GROUP BY tblAWSC.DLRNUM, tblAWSC.DLRNAME;
What should I do to make it return all records from the dealer table?
for those who have submitted any, and either N/A or null for those who
have not submitted valid entries.
There are 341 records in my dealer table, but the query only returns
the 227 who have submitted claims, not any of the others. I assumed
originally that it was because I was using an inner join when I should
have been using a left join, but either join type returns the same
number of records.
SELECT tblAWSC.DLRNUM, tblAWSC.DLRNAME, Max([All Claims].DATE) AS
[MOST RECENT]
FROM tblAWSC LEFT JOIN [All Claims] ON tblAWSC.DLRNUM = [All
Claims].DLRNUM
WHERE (([All Claims].DLRNUM=[tblAWSC].[DLRNUM])
AND ([All Claims].APPROVED<>"N")
AND ([All Claims].TOTAL<>0))
GROUP BY tblAWSC.DLRNUM, tblAWSC.DLRNAME;
What should I do to make it return all records from the dealer table?