deleting matching records from two tables

Jack1024

New member
Local time
Today, 00:50
Joined
Dec 5, 2012
Messages
2
I have two tables "Master List" and "Audit". I want to delete the records from the "Master" that match those in the "Audit". I am using Access 2010 and have used it often but have built very few queries. Consider me a beginner please.
 
Be very careful when deleting records. You cannot undo this statement!

See http://www.w3schools.com/sql/sql_delete.asp

I would recommend you work with a SELECT query first to make sure you are dealing with the proper records, then move on to the DELETE query.

Some people will suggest you make a copy of your Table(s) before working with DELETE.

Good luck.
 
Thank you jdraw. If i understand this correctly this is deleting from one table and know value. I am wanting to delete from one table using matching unique value from another table. What am I missing?
 
Not sure I'm following this
If i understand this correctly this is deleting from one table and know value.

With databases and SQL
--you insert records INTO 1 table at a time.
--you UPDATE existing records in 1 table at a time
--you DELETE records from 1 table at a time.

Are you working with sample/test data?

First do a Select query first.

The general format of the Select query will be something like the following:
Code:
Select table1.*
, table2.*
FROM
table1 inner join table2
where
table1.uniquefld = table2.uniquefld

Substitute your table names and unique field names as appropriate.

By using the SELECT query, you will not do any updates/deletes from your tables.
 

Users who are viewing this thread

Back
Top Bottom