left outer join in a clause or

0

I have a problem with a query, which I need to do a left outer join of one table with another, or considering values as 0, if that's the case, basically what I was doing was as follows.

select B.coluna
from A, B
where A.coluna = B.coluna(+) or B.coluna = 0;

But you are returning the following, saying that it is not possible to do a left join on an or operator.

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

Could you help me tell how I can resolve this?

    
asked by anonymous 09.10.2017 / 21:20

1 answer

0

try:

select 
    B.coluna
from A
left outer join B on b.coluna = a.coluna or b.coluna = 0

Trying to use the same syntax you used, I think it would look like this:

select B.coluna
from A, B
where (A.coluna = B.coluna or B.coluna = 0)(+);
    
09.10.2017 / 21:25