G
Guest
I'm trying to delete from a select query. The query includes two tables, a
parent and child table. The query looks like the following:
SELECT PMOC.PMOCID, PSSR.PMOCID
FROM PMOC LEFT JOIN PSSR ON PMOC.PMOCID = PSSR.PMOCID;
Based on a posting I also tried the following:
SELECT DISTINCTROW PMOC.PMOCID, PSSR.PMOCID
FROM PMOC LEFT JOIN PSSR ON PMOC.PMOCID = PSSR.PMOCID;
The record from the child table (PSSR) is deleted, however, the parent
(PMOC) record is not deleted. In the relationship I have it defined as
cascade delete.
When I try the delete it appears to work. The record is even removed from
the query display. However, if I exit and reentry the query the parent
record is back.
Does someone know what is happening?
Thanks,
Leif
parent and child table. The query looks like the following:
SELECT PMOC.PMOCID, PSSR.PMOCID
FROM PMOC LEFT JOIN PSSR ON PMOC.PMOCID = PSSR.PMOCID;
Based on a posting I also tried the following:
SELECT DISTINCTROW PMOC.PMOCID, PSSR.PMOCID
FROM PMOC LEFT JOIN PSSR ON PMOC.PMOCID = PSSR.PMOCID;
The record from the child table (PSSR) is deleted, however, the parent
(PMOC) record is not deleted. In the relationship I have it defined as
cascade delete.
When I try the delete it appears to work. The record is even removed from
the query display. However, if I exit and reentry the query the parent
record is back.
Does someone know what is happening?
Thanks,
Leif