Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: strange PL/SQL Error
"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