K
Kiwi_731
Dear Experts
I have a query which is meant to delete any records in tableA which have a
matching field in tableB, thus:
DELETE TableA.*, TableB.ID_NO
FROM TableA INNER JOIN TableB ON TableA.ID_NO=TableB.ID__NO;
(The above was the SQL code generated by creating the delete query in
Design view).
As it happens, in this case there was only one such record out of a total of
about 1200 records. The record came up when I viewed the query before running
it.
On running the query however, I got the message: “Could not delete from
specified tablesâ€. *However*, when I added the keyword DISTINCTROW after the
DELETE, everything worked as expected. Thanks to my colleague for the
inspiration, but I still feel none the wiser.
Can someone explain what is going on here?
TIA
Hopeful Kiwi
I have a query which is meant to delete any records in tableA which have a
matching field in tableB, thus:
DELETE TableA.*, TableB.ID_NO
FROM TableA INNER JOIN TableB ON TableA.ID_NO=TableB.ID__NO;
(The above was the SQL code generated by creating the delete query in
Design view).
As it happens, in this case there was only one such record out of a total of
about 1200 records. The record came up when I viewed the query before running
it.
On running the query however, I got the message: “Could not delete from
specified tablesâ€. *However*, when I added the keyword DISTINCTROW after the
DELETE, everything worked as expected. Thanks to my colleague for the
inspiration, but I still feel none the wiser.
Can someone explain what is going on here?
TIA
Hopeful Kiwi