Combing the Output from Two Queries

G

Gregc.

Hi

I have written two independent queries, and I wish to combine the
output from the queries into one table

QUERY 1
has account no, expediture type, sub hierarchy, fund type, fund type2
and tota; budget.

QUERRY 2
has account no, expediture type, sub hierarchy, fund type, fund type2
and tota; budget.

I'm a newbie at MS Access and was wondering how do I go about doing
this.

Greg
 
J

John Vinson

Hi

I have written two independent queries, and I wish to combine the
output from the queries into one table

QUERY 1
has account no, expediture type, sub hierarchy, fund type, fund type2
and tota; budget.

QUERRY 2
has account no, expediture type, sub hierarchy, fund type, fund type2
and tota; budget.

I'm a newbie at MS Access and was wondering how do I go about doing
this.

Greg

A UNION query will do the trick. See UNION in the online help - it's
pretty clear. Or open a new query; go to the SQL window; and type

SELECT [account no], [expediture type], [sub hierarchy], [fund type],
[fund type2], [total budget] FROM [QUERY 1]
UNION
SELECT [account no], [expediture type], [sub hierarchy], [fund type],
[fund type2], [total budget] FROM [QUERY 2]

Use UNION ALL if you want to see records which are duplicates between
the two queries - UNION by itself will strip out the dups.

John W. Vinson[MVP]
 

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