Deleting combined records from Access table

T

txlongorn

I have two tables that are joined by item numbers. I want Table A to
have items numbers that are not in Table B. How can I create a query
that will delete all records from Table A that are in Table B?
 
J

John W. Vinson

I have two tables that are joined by item numbers. I want Table A to
have items numbers that are not in Table B. How can I create a query
that will delete all records from Table A that are in Table B?

DELETE TableA.*
FROM TableA INNER JOIN TableB
ON TableA.itemnumber = TableB.itemnumber;

Back up your database first of course!! Deletion is irreversible.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top