Help with my first Delete Query

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

This is the SQL from the Design View.

I get an "Could not delete from specified tables" prompt.

This is my first attempt at a Delete Query.


DELETE EmplDB.*, EmplDB.STATUS
FROM EmplDB INNER JOIN EmplIDDB_Del ON (EmplDB.STATUS = EmplIDDB_Del.STATUS)
AND (EmplDB.EMPLID = EmplIDDB_Del.EMPLID)
WHERE (((EmplDB.STATUS)="i"));

Thanks in advance

dave
 
The syntax of the DELETE statement allows a filed list of [tableName].* - you
cannot name aditional fields.
 
Try

DELETE DISTINCTROW EmplDB.*
FROM EmplDB INNER JOIN EmplIDDB_Del ON (EmplDB.STATUS = EmplIDDB_Del.STATUS)
AND (EmplDB.EMPLID = EmplIDDB_Del.EMPLID)
WHERE (((EmplDB.STATUS)="i"));
 
Thank you John!!

Worked like a champ :-)

Dave

John Spencer said:
Try

DELETE DISTINCTROW EmplDB.*
FROM EmplDB INNER JOIN EmplIDDB_Del ON (EmplDB.STATUS =
EmplIDDB_Del.STATUS)
AND (EmplDB.EMPLID = EmplIDDB_Del.EMPLID)
WHERE (((EmplDB.STATUS)="i"));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top