I'm writing a query for a report that checks whether a persons id, which is recorded in one table, appears in a payment list in another table. The code below is what I have generated. It displays the details of the people whose id's do not appear in the payment list for a particular event. The problem is it is really inefficient and can take 10minutes to genereate the query results or the report that is built on top of it. Maybe I've written in completely incorrectly but I gleaned the code from several tutorials. Any help would be extremely helpful.Thanks in advance.
Code:
SELECT Donations.DonerLastName, Donations.DonerFirstName, Donations.DonerOrg, Donations.[Address Line 1], Donations.[Address Line 2], Donations.[Address Line 3], Donations.[Address Line 4], Donations.[Address Line 5]
FROM Donations, PaymentsReceived
WHERE (((Exists (Select * from PaymentsReceived Where PaymentsReceived.[DonerRegID] = Donations.[Donation ID]))=False))
GROUP BY Donations.DonerLastName, Donations.DonerFirstName, Donations.DonerOrg, Donations.[Address Line 1], Donations.[Address Line 2], Donations.[Address Line 3], Donations.[Address Line 4], Donations.[Address Line 5], Donations.[Donation ID], PaymentsReceived.EventType
HAVING (((PaymentsReceived.EventType)=6));