Woodpile
New Member
- Joined
- Sep 14, 2007
- Messages
- 38
- Office Version
- 365
- 2016
- Platform
- Windows
Hello All,
I am hoping someone can guide me in the right direction. I am trying to delete records in one table based on query results from another table.
I have two tables of interest: For clarity, call them Tbl A and Tbl B. Tbl B is entirely a subset of Tbl A with certain fields included. The common fields between the two are Order, which is a unique identifier, and User Status, which changes over time.
Each week, I update the records in Tbl A. I have written a query that finds the common Orders where the User Status has changed in Tbl A and I want to delete those records in Tbl B.
I have tried to create a Delete Query several different ways but either get an error saying I did not specify the table from which to delete the records or I get an error saying the selected records cannot be deleted. I do not know enough about SQL to know how to edit the code the way the help file from Microsoft is trying to direct me.
Any help would be greatly appreciated.
Thank you for getting this far,
Ed
I am hoping someone can guide me in the right direction. I am trying to delete records in one table based on query results from another table.
I have two tables of interest: For clarity, call them Tbl A and Tbl B. Tbl B is entirely a subset of Tbl A with certain fields included. The common fields between the two are Order, which is a unique identifier, and User Status, which changes over time.
Each week, I update the records in Tbl A. I have written a query that finds the common Orders where the User Status has changed in Tbl A and I want to delete those records in Tbl B.
I have tried to create a Delete Query several different ways but either get an error saying I did not specify the table from which to delete the records or I get an error saying the selected records cannot be deleted. I do not know enough about SQL to know how to edit the code the way the help file from Microsoft is trying to direct me.
Any help would be greatly appreciated.
Thank you for getting this far,
Ed