output results of multiple queries.

M

Matthew

I have four separate queries that each return one column
of reasults. Is there a way to have the results of each
of the four queries output to the same excel file? For
example, the results of query 1 output to Column A,
results of query 2 output to Column B. Any advice is
greatly appreciated. thanks,

matthew
 
G

Graham R Seach

Matthew,

In order to return each ColumnA of each query so it occupies a separate
column in the final query, there must be something that forms a relationship
between each query. In the query below, that relationship is formed by the
ID column in each query.

SELECT Query1.Field1 AS OField1,
Query2.Field1 AS OField2,
Query3.Field1 AS OField3,
Query4.Field1 AS OField4
FROM ((Query1 INNER JOIN Query2 ON Query1.ID = Query2.ID)
INNER JOIN Query3 ON Query1.ID = Query3.ID)
INNER JOIN Query4 ON Query1.ID = Query4.ID

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 

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