Skip to Main Content

Database Software

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!

How to Specify Left Outer Join in OWB

user616385Feb 17 2008 — edited Feb 18 2008
If I run the query:

select s.school_id,
nvl(max(decode(cv.cat_id, 'UCL', cv.long_desc, null)),'Unknown') UCL,
nvl(max(decode(cv.cat_id, 'REGION', cv.long_desc, null)),'Unknown') REGION,
nvl(max(decode(cv.cat_id, 'TREASREG', cv.long_desc, null)),'Unknown') TREASREG,
nvl(max(decode(cv.cat_id, 'RELGN', cv.long_desc, null)),'Unknown') RELGN,
nvl(max(decode(cv.cat_id, 'NGEFF', cv.long_desc, null)),'Unknown') NGEFF,
nvl(max(decode(cv.cat_id, 'PCAP', cv.long_desc, null)),'Unknown') PCAP,
nvl(max(decode(cv.cat_id, 'ATSIC', cv.long_desc, null)),'Unknown') ATSIC
from sdw.sdr_schools s
left outer join
sdw.sdr_school_category_values scv on s.school_id = scv.school_id
left outer join
sdw.sdr_category_values cv on cv.cat_id = scv.cat_id
and cv.cat_value_id = scv.cat_value_id
group by s.school_id
order by s.school_id

I get 1706 records. In OWB I get 1656 records.

In OWB I use a JOIN for the three tables, then an expression for the decode lines and sort and then the final table. In the SQL above, if the second left outer join is removed I get 1656 records?

Ho do you force OWB to produce 1706 records?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 17 2008
Added on Feb 17 2008
2 comments
1,527 views