[AccessD] Delete Query with a join

Bill Benson bensonforums at gmail.com
Thu Aug 28 21:40:55 CDT 2014


Try

   DELETE [rpt_DMHClaim 14].*
   FROM [rpt_DMHClaim 14]
WHERE Exists
   (SELECT 1
    FROM [qry 01a rpt_DMHClaim 14 Dupes to be > deleted]
    WHERE [qry 01a rpt_DMHClaim 14 Dupes to be > deleted].ClaimNumber =
[rpt_DMHClaim 14].ClaimNumber
AND
  [qry 01a rpt_DMHClaim 14 Dupes to be > deleted].MaxOfEOB_ID =
[rpt_DMHClaim 14].EOB_ID)

Action queries don't much like joins ad even distinctrow can lead to
duplicates no? Not sure really.

Got that here:
http://stackoverflow.com/questions/5585732/how-to-delete-in-ms-access-when-using-joins


More information about the AccessD mailing list