Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!drn.maxwell.syr.edu!news.maxwell.syr.edu!postnews.google.com!g43g2000cwa.googlegroups.com!not-for-mail
From: "Joe" <joemitchellsc@yahoo.com>
Newsgroups: comp.databases.oracle.server
Subject: Too Many Full Outer Joins???  PL/SQL: ORA-00918: column ambiguously defined
Date: 14 Sep 2005 17:04:17 -0700
Organization: http://groups.google.com
Lines: 24
Message-ID: <1126742657.132231.278850@g43g2000cwa.googlegroups.com>
NNTP-Posting-Host: 12.144.110.131
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1126742662 4501 127.0.0.1 (15 Sep 2005 00:04:22 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 15 Sep 2005 00:04:22 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.0 hquwilh1-11a1x0.hospira.corp:8080 (squid/2.5.STABLE6)
Complaints-To: groups-abuse@google.com
Injection-Info: g43g2000cwa.googlegroups.com; posting-host=12.144.110.131;
   posting-account=ViqQrwwAAABUcn_XViphAUiAAKc1kZz2
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.server:251557

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

