Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Subquery SQL Statemebnt (Delete)

Subquery SQL Statemebnt (Delete)

From: Sean Dolan <dolans_at_stripe.Colorado.EDU>
Date: 4 Aug 98 17:57:10 GMT
Message-ID: <dolans.902253430@stripe.Colorado.EDU>

        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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US