1. Computing

Discuss in my forum

Mike Chapple

Error: Could Not Delete from Specified Tables

By December 27, 2012

Follow me on:

In a recent forum message, a user wrote:

"Hello, I'm working with two tables. One is the "Repairs" table and the other is the "RepairRegion" table. I'm attempting to delete any/all record(s) in the "Repairs" table that is in the "OBS" region in the "RepairRegion" table. Here is the query:

DELETE Repairs.*, RepairRegion.RegionID
FROM Repairs INNER JOIN RepairRegion ON Repairs.Repair_ID = RepairRegion.RepairID
WHERE (((RepairRegion.RegionID)="obs"));


I receive the error message "Could not delete from specified tables".What do you suppose that I'm doing wrong?? Thank you for looking at this."

Can you help? Interested in answers to the same question? Visit the About Databases Forum and join the discussion!
Comments
January 1, 2013 at 9:48 pm
(1) Moven says:

Try using this .
delete from Repairs where exists
(
select * from Repairs where Repairs.Repair_ID=RepairsRegion.Repair_ID and RepairRegion.RegionID=”obs”
)
;

Thank you for sharing experience.

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>
  1. About.com
  2. Computing
  3. Databases

©2014 About.com. All rights reserved.