Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Query question 1

Status
Not open for further replies.

stocktondesigns

Technical User
Aug 31, 2003
16
US
I have two tables, MasterList and RelatedList. Both have a Email address field that I have joined on. There are 7500 records in the RelatedList that I want to purge from the MasterList which contains around 16000 records.

When I try to create a delete query in Access it will not permit me to delete records from the MasterList no matter what I do. I even created a seperate table containing all of the records I want to delete. Can someone please show me how to execute a delete query in Access with a joined table.
 
You've not provided much detail abiut your tables & fields but try some variation of
Code:
   Delete * From MasterList
   Where    MasterList.email IN 
            (Select MasterList.email
             From MasterList INNER JOIN RelatedList 
                  ON MasterList.email = RelatedList.email)
 
Hey Golom,

How do you get the code to appear like that?
 
hneal98,

If you are talking about the colour, click on the Process TGML above the SUBMIT POST button.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top