troubleshooting Question

Specify the table containg the records you want to delete

Avatar of mtrussell
mtrussell asked on
Microsoft AccessVBASQL
14 Comments1 Solution97 ViewsLast Modified:
This it appears to be simple but getting all the stars to align on the SQL query is proving to be a pain.  

Basically, I have in Table1 a list all the IDs I want to delete out of Table2

The key field name in both tables is called ID.  What I want to do is delete all the records from Table2 that are equal to the ID in Table 1.

I have done this in a delete query with a join with the below code but it is giving be the above error

DELETE Tbl_ClientFlightControl.ID
FROM Tbl_ClientFlightControl INNER JOIN tbl_tmp_NotAsia_Clients ON Tbl_ClientFlightControl.ID = tbl_tmp_NotAsia_Clients.ID;

How do I fix the SQL code to get the desired results?
Join our community to see this answer!
Unlock 1 Answer and 14 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 14 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros