misuk11
07-21-2005, 11:46 AM
I have a simple query that uses a right outer join, ive used the RIGHT OUTER JOIN method and also =(+) method. Both queries should be identical, but they return different numbers of rows. Am I missing something really obvious here
query 1
select bc.id,bct.id AS "role_id",
bct.description AS "role_name",
bc.contributor_name AS "contributor"
FROM billings_contributions bc RIGHT OUTER JOIN billings_contrib_types bct
ON bct.id = bc.contribution_type_id
WHERE bct.common_flag = 'Y'
ORDER BY bct.app_seq desc
query 2
select bc.id,
bct.id AS "role_id",
bct.description AS "role_name",
bc.contributor_name AS "contributor"
from billings_contributions bc,
billings_contrib_types bct
where bct.id = bc.contribution_type_id(+)
and bct.common_flag = 'Y'
order by bct.app_seq desc
query 1
select bc.id,bct.id AS "role_id",
bct.description AS "role_name",
bc.contributor_name AS "contributor"
FROM billings_contributions bc RIGHT OUTER JOIN billings_contrib_types bct
ON bct.id = bc.contribution_type_id
WHERE bct.common_flag = 'Y'
ORDER BY bct.app_seq desc
query 2
select bc.id,
bct.id AS "role_id",
bct.description AS "role_name",
bc.contributor_name AS "contributor"
from billings_contributions bc,
billings_contrib_types bct
where bct.id = bc.contribution_type_id(+)
and bct.common_flag = 'Y'
order by bct.app_seq desc