Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access: Union  2 queries not tables

Posted on 2008-10-15
2
Medium Priority
?
273 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 2000 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 2000 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
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 is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

719 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