Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> ORA 1719 outer join operator (+) not allowed in operand of OR or IN
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 CanhaReceived on Tue Jul 15 2003 - 16:48:49 CDT