
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