OK,
I know what records I need to delete, just not sure how to do this.
I have 2 tables.
My main table, and a child table that hold some additional info for that record.
What I've been asked to do is, delete all records where in the child table the records meet a certain criteria.
So first I created a select query, added my main table, and then my child table.
Added my criteria to filter out and found the records they want removed.
So I thought I could just convert it to a delete query and be done. Nope because of the relationship between the tables it would not let me do it this way.
So the select query shows me all the ID#s that need to be removed (194k worth of them). How do I use the data from the select query, to create a delete query to remove all the files from the maintable (which should delete the data from the child table because of the relationship?)?
Here is the select query, that found the records that need to be deleted
I know what records I need to delete, just not sure how to do this.
I have 2 tables.
My main table, and a child table that hold some additional info for that record.
What I've been asked to do is, delete all records where in the child table the records meet a certain criteria.
So first I created a select query, added my main table, and then my child table.
Added my criteria to filter out and found the records they want removed.
So I thought I could just convert it to a delete query and be done. Nope because of the relationship between the tables it would not let me do it this way.
So the select query shows me all the ID#s that need to be removed (194k worth of them). How do I use the data from the select query, to create a delete query to remove all the files from the maintable (which should delete the data from the child table because of the relationship?)?
Here is the select query, that found the records that need to be deleted
Code:
SELECT tbl_Edit_Type_IRR.Information, tbl_Edit_Type_IRR.Issue, tbl_Edit_Type_IRR.Review, tbl_Edit_Type_IRR.Main_ID, T_tbl_main.Main_ID
FROM T_tbl_main INNER JOIN tbl_Edit_Type_IRR ON T_tbl_main.Main_ID = tbl_Edit_Type_IRR.Main_ID
WHERE (((tbl_Edit_Type_IRR.Information) Is Null) AND ((tbl_Edit_Type_IRR.Issue) Is Null) AND ((tbl_Edit_Type_IRR.Review) Is Null));