Delete Query

melanemac

Registered User.
Local time
Today, 11:15
Joined
Feb 17, 2005
Messages
14
I have two tables. The first table EES has the list of employees that I need and their information. The second table EPAY has even more employees and each employee may have duplicate rows.

I am wanting to delete any employee on EPAY that does not exist on EES.

I tried creating a delete table with the join from EPAY to EES, where a field on EES is null and then added the table fields from EPAY to be deleted. When I "view", it is showing all the rows that should be deleted, however, when I run, it is giving me the error that it "could not delete from specified tables".

Is there a way to do this? I'm not that familiar with delete queries, even though this seems to 'make sense' to me.:confused:
 
The reason you cannot delete is that there is a Join in the query (I think). A delete query runs under similar rules to a query amendind data in that with a join it becomes an un-updateable query.

Step 1 Put a text field in the table where you want to delete
Basically use query to identify the redundant records and update the new field to say X

Then run a delete query on the single table to delete records where field has an X

L
 

Users who are viewing this thread

Back
Top Bottom