Combing the Output from Two Queries

  • Thread starter Thread starter Gregc.
  • Start date Start date
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
 
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]
 
Back
Top