Ambiguous Outer Joins.... 
Author Message
 Ambiguous Outer Joins....

I have an application which uses a VB front end and a JET MDB file as a
back end.  Every place where possible, I use SQL querries to find, add,
and change information.  I have exactly one query which is giving me
problems with the Outer Join problem.  It has an outer join between two
tables, and then both tables are inner joined to other tables.  As far
as I am concerned, the results will be the same no matter whether the
outer join is performed first, or if all the outter joins are performed
first.  The problem is that JET doesn't like this.  It says it is to
ambiguous.  I have tried using parentheses for precedence as well as
including sub-queries as tables enclosed in ().  Nothing seems to work.
MS documentation says that the way to get around that is to create one
query and then to use that in a second query.  I can do that, but I
don't know of a way to do so without creating a query as part of the MDB
file.  It is against my religeon to do so and I impliment everything in
code.  How can I impliment multiple queries or my several joins through
just code?  Below is a sample of the query I am trying to perform:

SELECT table-1.field-1, table-2.field-2, table-3.field-3,
table-4.field-4

FROM table-1, table-2, table-3, table-4,

table-1 RIGHT JOIN table-2 ON table-1.field-5 = table-2.field-6,
table-3 INNER JOIN table-1 ON table-3.field-7 = table-1.field-8,
table-4 INNER JOIN table-2 ON table-4.field-9 = table-2.field-0

How can I do this w/o having to store queries in the MDB file?  Thanx
for any help.

Daniel M. Pomerantz



Fri, 29 Dec 2000 03:00:00 GMT  
 Ambiguous Outer Joins....
Have you try all you SQL in MS Access first.  If it works the way you wanted
in ACCESS, I just copy the SQL statement to VB App and user db.Execute
SQLString.  It should work.
Quote:

>I have an application which uses a VB front end and a JET MDB file as a
>back end.  Every place where possible, I use SQL querries to find, add,
>and change information.  I have exactly one query which is giving me
>problems with the Outer Join problem.  It has an outer join between two
>tables, and then both tables are inner joined to other tables.  As far
>as I am concerned, the results will be the same no matter whether the
>outer join is performed first, or if all the outter joins are performed
>first.  The problem is that JET doesn't like this.  It says it is to
>ambiguous.  I have tried using parentheses for precedence as well as
>including sub-queries as tables enclosed in ().  Nothing seems to work.
>MS documentation says that the way to get around that is to create one
>query and then to use that in a second query.  I can do that, but I
>don't know of a way to do so without creating a query as part of the MDB
>file.  It is against my religeon to do so and I impliment everything in
>code.  How can I impliment multiple queries or my several joins through
>just code?  Below is a sample of the query I am trying to perform:

>SELECT table-1.field-1, table-2.field-2, table-3.field-3,
>table-4.field-4

>FROM table-1, table-2, table-3, table-4,

>table-1 RIGHT JOIN table-2 ON table-1.field-5 = table-2.field-6,
>table-3 INNER JOIN table-1 ON table-3.field-7 = table-1.field-8,
>table-4 INNER JOIN table-2 ON table-4.field-9 = table-2.field-0

>How can I do this w/o having to store queries in the MDB file?  Thanx
>for any help.

>Daniel M. Pomerantz



Sat, 30 Dec 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Anyone else getting ticked at "Ambiguous outer joins"?

2. outer join with ACCESS

3. Access 2000 -Full Outer Join

4. Outer Joins

5. How DAO works with outer join query with Parameter

6. No outer joins with Jet 4 drivers?

7. sql poser: OUTER JOINS?

8. SQL Builder - Outer Joins.

9. E_FAIL when outer-joining

10. Access OUTER JOIN syntax

11. SQL Builder - Outer Joins.

12. E_FAIL when outer joining

 

 
Powered by phpBB® Forum Software