Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Too Many Full Outer Joins??? PL/SQL: ORA-00918: column ambiguously defined

Too Many Full Outer Joins??? PL/SQL: ORA-00918: column ambiguously defined

From: Joe <joemitchellsc_at_yahoo.com>
Date: 14 Sep 2005 17:04:17 -0700
Message-ID: <1126742657.132231.278850@g43g2000cwa.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US