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
Solved

MS Access Query Combining Unsure If to Use a Union Query or Not

Posted on 2016-11-28
3
44 Views
Last Modified: 2016-11-28
In my setup I have Parent Products and Product Variations (Children). Table [SKUs] is the Parents and Table [Products] is the Children. I have successfully made multiple Select Queries to come up with a final Children Queries result. This Result includes all the Children and their attributes.

The final part that I can not come up with is how to also Insert the Parents into this list. In the End Result I need my list to have the parents and the children together. Reunite the family ;)

Do I use a Union Query or what?

Here is an example image of what I need:
ParentChildSampleImage.jpg
Here is some of my Children Results currently (ProdConSku is the Children SKU):
ParentChildSampleImage2.jpg
Thanks!
0
Comment
Question by:Dustin Stanley
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
PatHartman earned 500 total points
ID: 41904937
If you want the parent data in the same row as the child data (it will look like it repeats), then join the two tables/queries.  If you want the parent data to be separate rows along with child data but not related at all except perhaps by sorting to bring them in some logical order, then use a union.
0
 

Author Comment

by:Dustin Stanley
ID: 41904941
Ok honestly I have never used a Union Query. I just researched and that is what my gut told me was the best option.
I need the Parent on a seperate row. I also Need the Parents [Skus].[SKU] and the Childrens [qryExport].[ProdConSku] under the same column in the New Query. Maybe just name the Column SKU. How would I go about this and do I have to have the same amount of columns for a Union Query. I am just very unfamiliar with a Union Query.
Thanks Pat!
0
 

Author Closing Comment

by:Dustin Stanley
ID: 41905050
Ok thanks. I am pretty sure I got it.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

809 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