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

Home -> Community -> Usenet -> c.d.o.server -> Re: strange PL/SQL Error

Re: strange PL/SQL Error

From: Keith Boulton <kboulton_at_ntlunspam-world.com>
Date: Mon, 30 Jul 2001 16:31:45 +0100
Message-ID: <b0f97.25800$vN4.200643@news11-gui.server.ntli.net>

"Sebastian Scholz" <e9926043_at_student.tuwien.ac.at> wrote in message news:3b656624.18831418_at_news.tuwien.ac.at...
> Thanks!
>
> So, there is really NO way to use MINUS inside a stored Procedure?
> The Problem is, that NOT EXISTS and NOT IN aren't as fast as MINUS is.
> Therefore I would prefer MINUS.
> Sebastian

You could create a view first and then do the insert from that e.g.

CREATE VIEW FRED AS
SELECT SA_ANLAGENKENNZ||OBJEKTTABELLE.SA_SUB||'-'||OBJEKTTABELLE.SA_SU) CODE
FROM OBJEKTTABELLE
MINUS
SELECT LOCATION FROM MNT.ASSET; INSERT INTO CUSTOMERDATA.NEW_ASSETS (LOCATION, NEUEASSETSOI, VERS) SELECT CODE, ROWNUM, 1 FROM FRED; Received on Mon Jul 30 2001 - 10:31:45 CDT

Original text of this message

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