Solved

Access: Union  2 queries not tables

Posted on 2008-10-15
2
269 Views
Last Modified: 2012-05-05
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
Comment
Question by:ouestque
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 5

Accepted Solution

by:
jfmador earned 500 total points
ID: 22725193
You can use this

SELECT Name, DOB FROM tblEmployee
UNION ALL
SELECT Name, BirthDate as DOB from TBLCustomer
0
 
LVL 5

Assisted Solution

by:jfmador
jfmador earned 500 total points
ID: 22725275
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question