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 clarification on ANSI Joins

816802Jul 6 2012 — edited Jul 6 2012
Hi All,

I need some clarification on the ANSI Join which I build to avoid an error when I am trying to execute the same in regular join.

With Regular join I am getting the error ORA-01417: a table may be outer joined to at most one other table.

Regular Join Condition:
select null
FROM
land_event_device_fraud T1, --Update Dealer
land_event_device_upgrade T2, --New Subscriber First Set
syn_intg_event_device_state T3, --Existing Subscriber
land_event_device_upgrade T4 --New Subscriber Second Set
WHERE T1.event_id = T2.event_id(+) AND T1.rate_plan_id = T2.rate_plan_id(+)
AND T1.event_id = T3.event_id(+) AND T1.rate_plan_id = T3.rate_plan_id(+)
AND T4.event_id = T1.event_id(+) AND T4.event_id = T1.rate_plan_id(+)
AND T4.event_id = T3.event_id(+) AND T4.event_id = T3.rate_plan_id(+);

--Getting error ORA-01417.

Replaced the above join with ANSI Join

SELECT NULL
FROM land_event_device_fraud t1
LEFT OUTER JOIN land_event_device_upgrade t2
ON (t1.event_id = t2.event_id AND t1.rate_plan_id = t2.rate_plan_id)
LEFT OUTER JOIN syn_intg_event_device_state t3
ON (t1.event_id = t3.event_id AND t1.rate_plan_id = t3.rate_plan_id),
land_event_device_upgrade t4
LEFT OUTER JOIN land_event_device_fraud t5
ON (t4.event_id = t5.event_id AND t4.rate_plan_id = t5.rate_plan_id)
LEFT OUTER JOIN syn_intg_event_device_state t6
ON (t4.event_id = t6.event_id AND t4.rate_plan_id = t6.rate_plan_id);


I want to know whether the ANSI Join is goig to work fine or it is going to give me any cartesian production information.

Appreciate your help here.

Thanks,
MK.
This post has been answered by Frank Kulash on Jul 6 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 3 2012
Added on Jul 6 2012
1 comment
72 views