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 -> Re: DELETE statement with a JOIN

Re: DELETE statement with a JOIN

From: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Fri, 16 Jan 2004 23:32:52 +0100
Message-ID: <uipg009lkh6kim2k00hnm6h9d21cbv2cm2@4ax.com>


On 16 Jan 2004 13:03:23 -0800, jeffl_at_hypershell.com (Jeff Lambert) wrote:

>Hi. I'm trying to convert this small piece of SQL 2000 code to Oracle
>8i.
>
>From what I gather in the news groups, you can't delete on a Join. So
>what should I do for this specific case?
>
>DELETE DESCHYPLIST
>FROM DESCHYPLIST DHL JOIN TPLDESCLIST TDL ON (DHL.FKINFO = TDL.FKINFO)
>WHERE FKTEMPLATELIST = @FkTmpl and FKLIST = @PkList

Convert the join to an in or exists subquery and/or read up on using inline views in a delete statement in your documentation.

--
Sybrand Bakker, Senior Oracle DBA
Received on Fri Jan 16 2004 - 16:32:52 CST

Original text of this message

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