Query contains ambiguous (outer) joins.

Error 3285

You tried to execute an SQL statement29F05E5 that contains multiple joins1LQIV1I, and the results of the query can differ depending on the order in which the joins are performed.  For example, this error can occur if you execute the following SQL statement:

 

          SELECT * FROM Customers, Orders, [Order Details],
          Customers LEFT JOIN Orders
          ON Customers.[Customer ID] = Orders.[Customer ID],
          Orders INNER JOIN [Order Details]
          ON Orders.[Order ID] = [Order Details].[Order ID];

 

Execution of this statement produces an error because the order of the joins is ambiguous.  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 your SQL statement.  The following queries illustrate how you might construct the preceding query so that the INNER JOIN Operation (SQL)11BWCB0 operation is performed before the LEFT JOIN, RIGHT JOIN Operations (SQL)AKPI8QA operation:

          Query1

     SELECT * FROM Orders, [Order Details],
Orders INNER JOIN [Order Details]
ON Orders.[Order ID] = [Order Details].[Order ID];

          Query2

     SELECT * FROM Customers, Query1,
Customers LEFT JOIN Query1
ON Customers.[Customer ID] = Orders.[Customer ID];