Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Too Many Full Outer Joins??? PL/SQL: ORA-00918: column ambiguously defined
I have about 10 queries that I'm stacking together as follows:
select *
from (select a, b from q1) q1
full outer join (select a, b from q2) q2 ON q1.a = q2.a full outer join (select a, b from q3) q2 ON q1.a = q3.a full outer join (select a, b from q4) q2 ON q1.a = q4.a full outer join (select a, b from q5) q2 ON q1.a = q5.a full outer join (select a, b from q6) q2 ON q1.a = q6.a;
When I try to compile them into a package, on the 7th query, I get this error: PL/SQL: ORA-00918: column ambiguously defined
I've removed the sub-queries one at a time and re-inserted them in different orders and they work until the 7th one is added.
I have no problems when I change the full outer joins to left joins; however I need to use full outer joins to get the correct data back.
Any ideas?
Thanks,
Joe
Received on Wed Sep 14 2005 - 19:04:17 CDT