cannot run delete query

xcao

Registered User.
Local time
Today, 07:59
Joined
Nov 25, 2003
Messages
40
--------------------------------------------------------------------------------
I have a query basically is to delete all records from a table that exists in another table.

but when run, I got an error:
Cannot delete from specified table.

Please help, the table is like this:

DELETE [Benefits].*
FROM [Benefits ] INNER JOIN FirstRecordsTODelete ON ([Benefits without duplicates].[Sub Plan Cat Desc] = FirstRecordsTODelete.[FirstOfSub Plan Cat Desc]) AND ([Benefits without duplicates].[Sub Plan Desc] = FirstRecordsTODelete.[FirstOfSub Plan Desc]) AND ([Benefits without duplicates].[Building Desc] = FirstRecordsTODelete.[Building Desc]) AND ([Benefits without duplicates].[First Name] = FirstRecordsTODelete.[First Name]) AND ([Benefits without duplicates].[Last Name] = FirstRecordsTODelete.[Last Name]);

Thanks
 
Have you looked at the relationship window to see if you can use the cascade delete option?
 
Do the tables have a 'Primary Key'? Mine does, and when I re-import the table, I have to re-instate the primary key. If I don't, I can't run my delete queries either.
 

Users who are viewing this thread

Back
Top Bottom