DELETE-query question

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

Guest

Why does Access tell me that: "Could not delete from specified tables"?
DELETE mattes.*
FROM KartObjektLista, mattes
WHERE mattes.ObjektID=KartObjektLista.ObjektID;

Thanx in advance

/Eric
 
Hi,

try


DELETE DISTINCTROW mattes.*
FROM KartObjektLista INNER JOIN mattes
ON mattes.ObjektID=KartObjektLista.ObjektID


The ON clause is preferable to the implicit join through the WHERE clause,
to keep updatability.

When we delete over a join, Jet requires DISTINCTROW.


Hoping it may help,
Vanderghast, Access MVP
 
Thank you, that worked :D

"Michel Walsh" skrev:
Hi,

try


DELETE DISTINCTROW mattes.*
FROM KartObjektLista INNER JOIN mattes
ON mattes.ObjektID=KartObjektLista.ObjektID


The ON clause is preferable to the implicit join through the WHERE clause,
to keep updatability.

When we delete over a join, Jet requires DISTINCTROW.


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top