Solved

Access: Union  2 queries not tables

Posted on 2008-10-15
2
266 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
  • 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
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.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

785 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