left Outer Join in a clause or

Asked

Viewed 113 times

0

I have a problem with a query, that I need to do a left Outer Join from one table to another, or considering the values as 0, if any, basically what I was doing was the following.

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

But it is returning the following, saying that it is not possible to make a left Join on an operator or.

Outer Join Operator (+) not allowed in operand of OR IN.

Could you help me tell me how I can fix this?

1 answer

0

trial:

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)(+);

Browser other questions tagged

You are not signed in. Login or sign up in order to post.