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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Operation must use an updatable query -- Access 97 Delete Query

Status
Not open for further replies.

morechocolate

Technical User
Apr 5, 2001
225
US
I have linked two tables together on TradeNo. I would like to delete all the records from Table A where the link matches, however I get the following error - Operation must use an updateable query.

I also tried specifying a criteria expression, but that did not work.

Any ideas?

The only other thing I can think of to do what I would like to do is add an additional field to the table that I want to delete records from and then to a single table delete query.

Thanks in advance.

MC
 
I think the following SQL statement should do it:
DELETE * FROM MainTable WHERE EXISTS (SELECT linkfield FROM MainTable INNER JOIN OtherTable ON MainTable.LinkField = OtherTable.LinkField);

Rick Sprague
 
Thanks Rick.

You got me on the right track with the subquery.

I actually had to use an IN instead of the EXISTS.

mc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top