Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

need help with outter join

287518Jul 2 2002
i got a peice of code from somebody here that helped out quite a bit... looked for my old post but the search engine doesnt work. It involves using an outer join. A peice of the code is shown below to get a little understanding:

SELECT decode(a.cnt, NULL, 'Not found', A.price_band_name) price_band_name,
decode(e.cnt, NULL, 'Not found', E.ins_prod) ins_prod_name

FROM (select price_band_id, price_band_name, count(1) CNT
from ATDM.pwr_price_band
group by price_band_id, price_band_name ) A,

(select id_number, ins_prod, count(1) CNT
from ATDM.USER_exposure_type
group by id_number, ins_prod ) E

WHERE uptd.price_band = A.price_band_id (+)
and (uptd.financial_exp = E.id_number or uptd.physical_del = E.id_number) <-- here is the problem


is there any way that you can include an outer join with a compound equality restriction, such as the one shown above. Without it, i lose the outer join for that particular statement.

If you arent sure what i am asking, please ask and i will try to clear it up. Also, if you have any free websites that may help me out more on outer joins, please post them. I have already done some scouring on Oracle Reference Guides and PL/SQL Reference Guides.

Thanks,
Jared



Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2002
Added on Jul 2 2002
6 comments
198 views