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 -> ORA 1719 outer join operator (+) not allowed in operand of OR or IN

ORA 1719 outer join operator (+) not allowed in operand of OR or IN

From: Jay Canha <jay.canha_at_yale.edu>
Date: Tue, 15 Jul 2003 17:48:49 -0400
Message-ID: <3F1476C1.40DBEFA@yale.edu>


I have recently encountered this error in a query and am trying to understand why Oracle doesn't allow this.

For example, the following yields the error:

select A.col1, A.col2, B.col1, B.col2
from table1 A, table2 B
where A.col1 = B.col1 (+)

    and (B.col5 (+) = 'X' OR B.col6 (+) = 'Y')

However, this equivalent query with the "or" condition expressed in two separate selects which are then unioned, works fine:

select A.col1, A.col2, B.col1, B.col2
  from table1 A, table2 B
  where A.col1 = B.col1 (+)
  and B.col5 = 'X'
  union
  select A.col1, A.col2, B.col1, B.col2
  from table1 A, table2 B
  where A.col1 = B.col1 (+)
  and B.col6 = 'Y';

My query is now running but -- any ideas on *why* Oracle is requiring this join to be expressed through two unioned selects, rather than just one select?

--
_________________________________________

   Jay Canha
Received on Tue Jul 15 2003 - 16:48:49 CDT

Original text of this message

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