How do I combine columns in a query

J

JoelF

I currently have run a series of queries that basically take a final item and
break it down by its components over and over again.. i end up with columns
that look like this

Parent Part Volume Component1 Volume Component2 Volume Etc

The next step is the combine the volume as an item could appear as
Component1 on one line and component2 on another. Basically I want to take
the 3 sets of 2 columns and just make them 1 long column that i can sum etc.
Is there any way to do this within access?
 
A

Allen Browne

Joel, you really need to redesign this table so you have many related
*records* in another table, rather than many repeating fields in this table.

Actually, that may be what you are asking how to do in your last sentence?
If so, create the table with just one set of columns for ParentPart,
Volumne, (and component?). Then populate it with 3 append queries.

In query design, choose Append on the Query menu to change it to an append
query. Choose the first component and volume, add criteria of:
Is Not Null
and append them to the target table.
Then choose the next set of fields, and append them.
Repeat for the 3rd set.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top