Delete Query

  • Thread starter Thread starter JohnR
  • Start date Start date
J

JohnR

I am trying to delete all records in one table that exist in another table
using this query:

DELETE tblAutomaticCollectionLetters.*
FROM tblAutomaticCollectionLetters INNER JOIN tblJeopardy ON
tblAutomaticCollectionLetters.AccountNumber = tblJeopardy.LocationID

I get an error message that this cannot be done. What am I doing wrong?
And how can I make it work?

Thank You in Advance

John
 
Try this:

DELETE tblAutomaticCollectionLetters.*
FROM tblAutomaticCollectionLetters WHERE
tblAutomaticCollectionLetters.AccountNumber IN
(SELECT tblJeopardy.LocationID FROM tblJeopardy);
 
Back
Top