swaybright
Technical User
Hi All,
I'm trying to set up a delete query that deletes all the parent records that have no child records. But I'm getting an error that says "could not delete from specified tables"
Generically, my sql is:
This is obviously wrong, but I don't know how to correct it. The corresponding select query works just fine.
Does anyone have any ideas?
TIA
Shane
I'm trying to set up a delete query that deletes all the parent records that have no child records. But I'm getting an error that says "could not delete from specified tables"
Generically, my sql is:
Code:
DELETE parenttable.*,childtable.foriegnkey
FROM parenttable
LEFT JOIN Childtable ON parenttable.primarykey=childtable.foriegnkey
WHERE (((childtable.foriegnkey) Is Null));
This is obviously wrong, but I don't know how to correct it. The corresponding select query works just fine.
Does anyone have any ideas?
TIA
Shane