I am trying to convert an sql statement from ANSI 89 into ANSI 92 (meaning to transofrm the "(+)" into "OUTHER JOIN")
Here is the code:
select a.*, p.price
from article a, prices p
where a.product_id = p.product_id(+)
and trunc(sysdate) + 1 between a.date_from and date_to
and trunc(sysdate) + 1 between p.date_from(+) and p.date_to(+);
I know that (+) refers in LEFT or RIGHT JOIN, depending of the possition where it is placed but I cannot get it how to transform the last line (
and trunc(sysdate) + 1 between p.date_from(+) and p.date_to(+)
)
Until now, I did the follwoing:
select a.*, p.price
from article a
left join prices p
on a.product_id = p.product_id
where trunc(sysdate) + 1 between a.date_from and date_to
but I hae no clue how to transform the last condition.
Can someone help with this, please?
Thank you,