Combine Queries. Is it possible?

T

TKM

I have two complicated queries that I need to join together in a report or
output to Excel. How would I go about this without using one as a subreport?
I need fields from both queries within my detail section and other areas of
my report. Is there another way around this? I need to export these queries
to Excel utilizing there report structure. Most of the fields in both queries
are different so a Union query is out of the question. Please help if you can.
 
K

KARL DEWEY

You can join the queries in a third query.
You can union even if the fields are different by inserting an alias like
this --
SELECT A.name, "a" AS Section, A.[section a] as Amount
FROM A
UNION SELECT B.name, B.Section, 0 AS Amount
FROM B;
 
K

kingston via AccessMonster.com

Can you not formulate a left or right join to return the relevant fields? I
don't think that Access supports outer joins. Otherwise, you might create a
temporary table that is populated by the queries in the structure that you
want.
 

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