Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

merging queries 1

Status
Not open for further replies.

kiloslug

Technical User
Nov 7, 2005
5
CA
I have a number of queries that have the same headings on them. I would like to merge these queries together so that all the data is in the same columns. Can this be done?

ex.

Query 1
Name Number
alan 23
fred 56

Query 2
Name Number
alan 46
fred 36

merge to
Query 3
Name Number
alan 23
alan 46
fred 56
fred 36
 
SELECT Name, Number FROM query1
UNION ALL
SELECT Name, Number FROM query2
UNION ALL
SELECT Name, Number FROM query3

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top