Query to join records according to "hierarchy"

S

sergio.pringle

I didn't know how else to describe it.

I have records with this structure:

Fields: Name; Last Name; Group
John; Brown; 1-1
Carl; Rogers; 1-1
Brian; Mann; 1-2
Charles; Grant; 2-1
Eddie; Murphy; 2-2
Carmen; Elec; 3-1
Ellen; Smith; 3-2
......and so on

What I need is to combine the field Name in group 1-1 to 1-2, 2-2,
3-2. Then 2-1 with 2-2, 3-2. Then 3-1 with 3-2.

Is this possible? If so, how can I do it?

Thanks for the help.
 
P

pietlinden

I didn't know how else to describe it.

I have records with this structure:

Fields: Name; Last Name; Group
John; Brown; 1-1
Carl; Rogers; 1-1
Brian; Mann; 1-2
Charles; Grant; 2-1
Eddie; Murphy; 2-2
Carmen; Elec; 3-1
Ellen; Smith; 3-2
......and so on

What I need is to combine the field Name in group 1-1 to 1-2, 2-2,
3-2. Then 2-1 with 2-2, 3-2. Then 3-1 with 3-2.

Is this possible? If so, how can I do it?

Thanks for the help.

so put all the 1- groups together, the 2- groups etc?
It's easier if you split the two into separate fields (maingroup,
subgroup) and then use fConcatChild from AccessWeb... www.mvps.org/access
See the modules section or just search for fConcatChild.
 
W

Wayne-I-M

Hi

You have this now in a query
Fields: Name; Last Name; Group
John; Brown; 1-1
Carl; Rogers; 1-1
Brian; Mann; 1-2
Charles; Grant; 2-1
Eddie; Murphy; 2-2
Carmen; Elec; 3-1
Ellen; Smith; 3-2
......and so on

Can you give a sample of the type of list you want (I am a little confused
by this)
 
S

sergio.pringle

Can you give a sample of the type of list you want (I am a little confused
by this)

First let me thank you for your help:

I don't have a query at the moment. All I have are records in a table.

The results from the query would be something like this:

Name A Name B Name C Name D
John(1-1) Brian(1-2) Eddie(2-2) Ellen(3-2)
Carl(1-1) Brian(1-2) Eddie(2-2) Ellen(3-2)
Charles(2-1) Eddie(2-2) Ellen(3-2)
Carmen(3-1) Ellen(3-2)

Basically every name in group1-1 can be together with group1-2
group2-2 and group3-3. Every name in group 2-1 can only be together
with group2-2 and group3-2... and so on.

Hope that helps,
 

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