Querying multi-tables

M

Mike

Hi All,

I have four tables, Table1, Table2, Table3, and Table4.
I'm trying to create a query that will retrieve all the
data from all four tables, regardless of the tables that
have data or not, I need to have some results. I created a
query that leads me into getting the results from Table1,
Table2, and Table3 but not Table4. Table1 has foreign key
linked to the primary key in Table2 and also another
foreign key linked to the primary key in Table3. In
Table2, I have a foreign key linked to a field in the
Table4. In Table3, I also have another foreign key linked
to the field inTable4. This is the error message that pop-
up, when I created a query:

"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
your sql statement".
 
L

Larry

-----Original Message-----
Hi All,

I have four tables, Table1, Table2, Table3, and Table4.
I'm trying to create a query that will retrieve all the
data from all four tables, regardless of the tables that
have data or not, I need to have some results. I created a
query that leads me into getting the results from Table1,
Table2, and Table3 but not Table4. Table1 has foreign key
linked to the primary key in Table2 and also another
foreign key linked to the primary key in Table3. In
Table2, I have a foreign key linked to a field in the
Table4. In Table3, I also have another foreign key linked
to the field inTable4. This is the error message that pop-
up, when I created a query:

"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
your sql statement".


.
Do multiple queies
query 1 table1 and table2
query 2 query1 and table3
query 3 query2 and table4
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top