Solved

How to create a delete query to delete entire records

Posted on 2016-11-30
2
45 Views
Last Modified: 2016-11-30
I use Access 2010.
I have two tables and I want to delete all records from one table that correspond with the second table.
The select query of the records that I want to delete is:

SELECT TblOrdersHeader.*
FROM TblOrdersHeader INNER JOIN tblDeleteOrdersHeaderForSeasonSelect ON TblOrdersHeader.OrderID = tblDeleteOrdersHeaderForSeasonSelect.OrderID;

In the query builder it looks like here:
Looks like in builder
The result from the select query is like
Records that will be deleted
I do not manage to make a working delete query. Will you help please.
0
Comment
Question by:Fritz Paul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 41907649
try this query


Delete TblOrdersHeader.*
 FROM TblOrdersHeader, tblDeleteOrdersHeaderForSeasonSelect
Where  TblOrdersHeader.OrderID In( Select tblDeleteOrdersHeaderForSeasonSelect.OrderID From tblDeleteOrdersHeaderForSeasonSelect)
0
 

Author Closing Comment

by:Fritz Paul
ID: 41907657
Thank you very much.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question