- Create a new Yes/No Field with the fieldname FLAG in the Jobs Table.
- Create an Update Query like the sample SQL given below by linking them both on the Key fields:
Code:
UPDATE Clients INNER JOIN Jobs ON Clients.ID = Jobs.IDX SET Jobs.FLAG = True;
3. Run the Update Query to mark the FLAG field for matching records of both tables.
4. This action will leave the records in the Jobs table which have no corresponding Clients records.
5. Create a DELETE Query on Jobs Table to select and delete the unmarked records.
Code:
DELETE Jobs.*, Jobs.FLAG
FROM Jobs
WHERE (((Jobs.FLAG)=False));