Illegal Outer Join Error - SQL Guru Needed 
Author Message
 Illegal Outer Join Error - SQL Guru Needed


>Select blah.blah, etc.

>FROM        tblA a  LEFT OUTER JOIN tblB b ON a.junk = b.junk
>            LEFT OUTER JOIN tblC c ON b.junk = c.junk
>    tblD d,
>    tblE e
>(here's the wringer...)

>WHERE       a.otherjunk = d.otherjunk AND
>            a.morejunk = e.morejunk

Try this:

  SELECT ....
  FROM ((((tblA AS A LEFT JOIN tblB AS B ON a.junk = b.junk)
                     LEFT JOIN tblC AS C ON b.junk = c.junk)
                     INNER JOIN tblD AS D ON a.otherjunk = d.otherjunk)
                     INNER JOIN tblE AS E ON a.morejunk = e.morejunk)

When you mix LEFT and INNER joins, the results depend on the order in
which the joins are applied.  So use the parens to avoid the 'Ambiguous
join' error message.

Sat, 18 Dec 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. SQL error (outer join)

2. sql guru's - need help with an inner join

3. sql poser: OUTER JOINS?

4. SQL Builder - Outer Joins.

5. SQL Builder - Outer Joins.

6. SQL statement on 2 or more tables (left outer joins)

7. Left Outer Join to SQL Server

8. AMBIGIOUS outer joins in my sql

9. Multiple Outer Joins using MS Jet SQL

10. SQL Builder - Outer Joins.

11. Multiple Outer Joins using MS Jet SQL

12. SQL Syntax for an Outer Join


Powered by phpBB® Forum Software