• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

Access: Union 2 queries not tables

I know how to create a union query between two tables.
Is there a way to create a union between 2 queries? (Instead of tables)

I want to create a query that gets the results from one query and appends  the results of another query to the very end.
0
ouestque
Asked:
ouestque
  • 2
2 Solutions
 
jfmadorCommented:
You can use this

SELECT Name, DOB FROM tblEmployee
UNION ALL
SELECT Name, BirthDate as DOB from TBLCustomer
0
 
jfmadorCommented:
if you want to add the second query at the end you can use

SELECT 1 as query, Name, DOB FROM tblEmployee
UNION ALL
SELECT 2 as query, Name, BirthDate as DOB from TBLCustomer
order by query
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now