Subject Need help with proper delete SQL
Author SLSolutions@aol.com
Hi:

Have a master table that is linked to several detail tables. Want to
have all linked records deleted when master record is deleted.

In the master query DeleteSql I added the following:

DELETE FROM HISTORY
WHERE EMPNO = :EMPNO;

I assumed all records in the HISTORY table that have an EMPNO that
matches the master tables EMPNO (tables are linked on EMPNO) would be
deleted, instead I get an error message that says "MULTIPLE RECORDS
DELETED". Since this is what I intended to do, delete multiple
records, I don't underdstand why this is an eror. Is there not a way
to automatically have all detail records linked to a master deleted
when the master is deleted?

Joe