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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

5 Queries 2

Status
Not open for further replies.

ncopeland

IS-IT--Management
Mar 12, 2002
88
GB
Hi

I have 5 queries. I want to be able to run these queries one after another and then join them into one list of records. Can anybody suggest a way of doing this.

KR

NC
 
Do they all produce the same set of fields in the results?

If som use the first as a make table query and the rest as update

[pc]

Graham
 
Hi Guys yes each query uses the exact same fields. I am not sure how to put the union statement together.

KR

NC
 
you can put the union query together like this --

query 1 goes here
union all
query 2 goes here
union all
query 3 goes here
union all
query 4 goes here
union all
query 5 goes here

:)

r937.com | rudy.ca
 
Hi

Bit of a novice with sql this is my union query.

SELECT qselIngredientsQTYREC1.*,
UNION ALL
SELECT qselIngredientsQTYREC2.*,
UNION ALL
SELECT qselIngredientsQTYREC3.*,
UNION ALL
SELECT qselIngredientsQTYREC4.*,
UNION ALL
SELECT qselIngredientsQTYREC5.*

Tried this but it didn't work. Any ideas.

KR

NC


 
Hi

When i run this I get

Query input must contain one query or table.

Any ideas.

KR

NC
 
And what what about this ?
SELECT * FROM qselIngredientsQTYREC1
UNION ALL
SELECT * FROM qselIngredientsQTYREC2
UNION ALL
SELECT * FROM qselIngredientsQTYREC3
UNION ALL
SELECT * FROM qselIngredientsQTYREC4
UNION ALL
SELECT * FROM qselIngredientsQTYREC5

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top