Query - multiple queies

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. An internet
user,Larry, suggested to use multiple queries as:

query 1 table1 and table2
query 2 query1 and table3
query 3 query2 and table4

Does anyone have any clue on what multiple queries are and
know how to implement them with the list noted above?

Thanks for the help...

Mike
 
J

John Vinson

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. An internet
user,Larry, suggested to use multiple queries as:

query 1 table1 and table2
query 2 query1 and table3
query 3 query2 and table4

Does anyone have any clue on what multiple queries are and
know how to implement them with the list noted above?

Multiple queries are... just three Queries in your Query design
window.

Open the Query design window, and add Table1 and Table2 to the query
background. Select the Join line and make it an Outer Join. Save this
query; Access will ask you for a name - call it Query1.

Now create another new Query. Add Query1 from the Queries tab, and
Table3 from the Tables tab. Repeat the join process.

Now repeat the operation joining Query2 to Table4. Save this under the
name Query3.

If you open Query3, you should see data from all four tables.
 
J

Joe Fallon

Based on your requirements: "retrieve all the data from all four tables"
you only need a single query.

Just add all 4 tables to it and do NOT join any of them.

You will get all the data from all the tables as a huge cartesian product.

(I doubt that is what you really want, but try it anyway. Then refine your
requirements.)
 
G

Giorgio Gentili

the fields that you are seeking for, all have the same name or data type?

in that case you can use a union clause.

select Field1 from table1 union
select otherfield1 as field1 from table2 union
select anotherfield1 as field1 from table3
where field1="Hello"

is convenient that you name or aliases the field names in the same manner so
access link them without problem.

Questions?
Wrong english?

Good Luck
Giorgio Gentili
Chile
 

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