How do you to tell the query to delete rows from appropriate table?

RHONDAK72

Board Regular
Joined
Dec 26, 2007
Messages
133
I'm using Access 2003. I have a query that links 2 tables (Table A and Table B). The query identifies duplicate ids but only lists the inactive ids with a Where statement (Where Status <> "A"). I want to have these inactive rows deleted from Table B.

In Design View, I selected query type "Delete Query". When I tried to run the query, I received an error that said "Specify the table ontaining the records you want to delete." How do I do this? (Probably a simple answer but I'm not sure how to do it...)

The "Delete" row in Design View already specifies "Where" and it will not let me change it to "From" in order to specify the table from which to delete rows. Do I need to hard code something in SQL or is there a way to specify it in Deisgn View?
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
I'm using Access 2003. I have a query that links 2 tables (Table A and Table B). The query identifies duplicate ids but only lists the inactive ids with a Where statement (Where Status <> "A"). I want to have these inactive rows deleted from Table B.

In Design View, I selected query type "Delete Query". When I tried to run the query, I received an error that said "Specify the table ontaining the records you want to delete." How do I do this? (Probably a simple answer but I'm not sure how to do it...)

The "Delete" row in Design View already specifies "Where" and it will not let me change it to "From" in order to specify the table from which to delete rows. Do I need to hard code something in SQL or is there a way to specify it in Deisgn View?

Here's a link to a sample.
http://www.databasedev.co.uk/delete_query.html

Be careful. A delete query will remove data from your table. You may want to make a copy of the table first....just in case!!!!
 
Upvote 0

Forum statistics

Threads
1,214,537
Messages
6,120,096
Members
448,944
Latest member
SarahSomethingExcel100

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top