Solved

Access: Union  2 queries not tables

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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Suggested Solutions

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

840 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