Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Union Queries
Kara 

16 years ago
Hi.
I have 6 individual select queries that I want to be displayed together in one table or query.
I think I need a union qury to do this, but am having trouble with the correct SQL statements.
Here is an example from Xcel:
Sample Results_test1 Results_test2
1 S S
2 S S
3 S S
4 S S
5 S S
6 S S
7 S S

I have 5 other queries like this; eah one representing a different test subject.  I want to see all test subjects and all results together--- with the capability of sorting and prioritizing based on sample.  In other words: See results for sample#1 across ALL test subjects (currently in separate tables)PLEASE help!!! Thank you.
-Kara


Answer from Richard Rost:

You have 6 different queries, but is all of the data in one TABLE? If so, you don't need a UNION query. I would just bring all of the data into a report and use SORTING AND GROUPING LEVELS (see below).

If, on the other hand, your data is all in different tables, then you might need a UNION query. A UNION query is the only type of query that you have to create in SQL. The basic syntax is like this:

SELECT FieldList FROM Table1
UNION
SELECT FieldList FROM Table2
UNION
SELECT FieldList FROM Table3

Aside from that, however, you will probably be OK with this…

You can use a SORTING & GROUPING LEVEL in a Microsoft Access report to group various like information together in one section and perform calculations like SUM and AVERAGE.

For example, if you want to see all of your sales grouped by State with a total for each State's sales, you would use a Sorting & Grouping Level.

See this free, step-by-step video tutorial for information on how to create a Sorting & Grouping Level:

http://599cd.com/tips/access/report-sorting-grouping?key=BlFAlEx

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/9/2026 2:13:23 PM. PLT: 0s