Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Subquery SQL Statemebnt (Delete)
In straight SQL terms, I am trying to delete from a table where by I do a subquery on another table first: EX:
delete from shhd_owner.incident_journal where id = (Select ij.ID FROM SHHD_OWNER.INCIDENT_JOURNAL ij, SHHD_OWNER.INCIDENTS i WHERE i.CONTRACT_ID=10000 AND (ij.INCIDENT_ID=i.ID));
The problem is that the subquery returns multiple rows and the delete cannot function. Am I missing something or am I going to have to make a PL/SQL procedure with using a cursor and fetch?
Thanks,
Sean
Received on Tue Aug 04 1998 - 12:57:10 CDT
![]() |
![]() |