Delete and INNER JOIN

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Froum
well I want to delete a set of rows from a table by joinin it with another
table but I get this error : "Could not delete from specified tables" but I
don't have any permission porblem because I can delete from each of these two
tables seperately, and here is the query :

delete tbl10_12_13_Union_1.*
FROM tbl10_12_13_Union_1 INNER JOIN tbl10_12_13_Union_Intersect ON
tbl10_12_13_Union_1.ObjectID=tbl10_12_13_Union_Intersect.FID_tbl10_12_13_Union;

Please help me guyz
Regards,
 
Try the following rewrites.

DELETE DistinctRow tbl10_12_13_Union_1.*
FROM tbl10_12_13_Union_1 INNER JOIN tbl10_12_13_Union_Intersect ON
tbl10_12_13_Union_1.ObjectID=tbl10_12_13_Union_Intersect.FID_tbl10_12_13_Union

Or even more likely to work

DELETE DistinctRow tbl10_12_13_Union_1.*
FROM tbl10_12_13_Union_1
WHERE ObjectID In
(SELECT FID_tbl10_12_13_Union
FROM tbl10_12_13_Union_Intersect)
 
John,
You have no idea how this helped me out. For weeks I have been plagued with
trying to get data out of a database with this same error.

Much Kudos.....

Lincoln
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top