Delete Queries and joins - Where clauses

D

DJJ

I can't get this delete query to work. I am running Access 2003 connected
to SQLServer by ODBC. Is there some limitations on delete queries with
Where clauses and joins? I can't get any to work.

DELETE PhysInv.*
FROM PhysInv LEFT JOIN Inventory ON PhysInv.KeyCounter =
Inventory.KeyCounter
WHERE (((Inventory.KeyCounter) Is Null));

DJJ
 
D

DJJ

I got the answer from a reply to an early post. It's all about sub-queries!

DELETE PhysInv.*
FROM PhysInv
WHERE (((PhysInv.KeyCounter) In (SELECT PhysInv.KeyCounter FROM PhysInv
LEFT JOIN Inventory ON PhysInv.KeyCounter = Inventory.KeyCounter WHERE
(((Inventory.KeyCounter) Is Null)))));
 

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

Top