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 -> Problem with the outer join

Problem with the outer join

From: Inna <mednyk_at_my-deja.com>
Date: Wed, 06 Dec 2000 02:53:52 GMT
Message-ID: <90k9nu$9m0$1@nnrp1.deja.com>

Hello, everyone.
I have a big problem with the outer join. I migrated the SQL db to Oracle and right now I am working with procedures.I use the DBA studio. So when I compiled the procedures with outer join (+) and <OR> condition operator and <IN> using
this tools I did not have any problem and was surprised because we can not use <OR> and <IN> with the (+) operator. But when I conected to the application, I received the error message from Oracle telling that these operators can not be used together. So there is my question: This is the fragment of the procedure body How can I make it valid and return the same result. If there is need of functions or procedures I don't minde. Thank you an advance.

PROCEDURE GETGROUPINFO
(PID INTEGER,
PSELECTID INTEGER,
RC1 IN OUT RCT1)
AS
BEGIN
OPEN RC1 FOR
SELECT emp.ID, emp.NAME,
emp.DESCR,
emp.MANID ,
emp1.FIRSTNAME , emp1.LASTNAME ,
emp.MANID,
emp.DEFAULTID

FROM emp, emp1

WHERE (emp.UID=PID) and
emp.MANID = emp.UID(+)
 OR ((PSELECTID <> 0)

    AND (emp.UID IN

        (SELECT SEL.OBJECTID
        FROM SEL
        WHERE SEL.USERID = PSELECTID
        AND SEL.OBJECTTYPE = 29)))

ORDER BY emp.NAME;
END;
END;

--
Inna.Junior programmer.


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Dec 05 2000 - 20:53:52 CST

Original text of this message

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