troubleshooting Question

Simple Delete Query

Avatar of ExpExchHelp
ExpExchHelpFlag for United States of America asked on
Microsoft Access
4 Comments1 Solution264 ViewsLast Modified:
I'm trying to figure out how to create a simple DELETE query in Access.

Assuming we have two structurally identical tables, I want to delete records (from Table A) that exist in both Table A and Table B.

See attached JPG for a basic example (where records 89 and 17 should be deleted from Table A).

I chose the following SQL but it results in an error "Specify the table containing the records you want to delete).

DELETE TableA.Field1
FROM TableA INNER JOIN TableB ON TableA.Field1 = TableB.Field1
WHERE (((TableA.Field1)=(SELECT TableA.Field1 FROM TableA INNER JOIN TableB ON TableA.Field1 = TableB.Field1;)));

What's the proper syntax?

Join our community to see this answer!
Unlock 1 Answer and 4 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 4 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