Ambiguous Outer Joins
Posted on 2002-03-18
I do a report periodically that uses 3 semesters of course failure data. The data for each semester is brought into Access as a separate table: e.g., Jan01, Jun01, Jan02. The report will use several fields from the current table—in this case, Jan02—and one field from each of the earlier tables, Jan01 and Jun01. I want to use a make table query to bring the selected fields from each table into a single table.
In each table, the primary key is a composite of the school’s 4-digit unit number and 2-digit grade (called UntGrd); so, e.g., 101009 signifies 9th grade in unit 1010.
I have no problem designating UntGrd as the primary key in each table, which implies that the values for UntGrd are unique in each table. I have no problem relating the tables and enforcing referential integrity. The most recent table (Jan02) is the primary table. Therefore, referential integrity implies that all records in Jan01 and Jun01 are in Jan02. There are no “orphans” in Jan01 and Jun01 although “childless parents” are permitted in Jan02. The joins from Jan02 to Jan01 and Jun01 are left outer joins (all records in Jan02 and only the matching records in Jan01 and Jun01).
My problem is that when I run the make table query, I get the message “The SQL statement could not be executed because it contains ambiguous outer joins. To force one of the joins to be performed first, create a separate query that performs the first join and then include that query in you SQL statement.” I would expect the joins to be performed in the order that tables are called into the query; so, I obviously don’t understand the problem.
Doing a work-around is easy enough. I can run a make table query to join any two tables, say Jan01 and Jun01, to produce Temp01. Then, I can run another make table query to join Temp01 and Jan02. Fine, but I still would like to understand that error message. 100 points to anyone who can explain it.