C
Christian
Hi NG,
I'm trying to make sense of some data I have imported to Access from various
sources.
I have one table with two fields; A and B.
Field A contain duplicate values
Field B contain duplicate values
So one A links to several Bs.
And one B might link to several As (this is not always the case).
So the table contains is a many-to-many relation.
I would like to calculate a new Group - a "Field C" - in a query that would
group A and B records.
Example of desired query result:
----------------------------------------------------
A; B; C
----------------------------------------------------
1; 5; X; first group
1; 6; X; because A is 1 (duplicate)
2; 5; X; because B is 5 (duplicate)
2; 7; X; becase A is 2 and above row has B=5 and A=2.
3; 8; Y; new group as A=3 is not among previous A values and neither is 8
among B values
3; 9; Y; because A=3 is part of group
----------------------------------------------------
I'm not sure if this is easy or impossible. I have been trying to wrap my
head around this problem for a few hours now and I'm stuck.
Any ideas on how to attack this problem is warmly welcome
- Chr
I'm trying to make sense of some data I have imported to Access from various
sources.
I have one table with two fields; A and B.
Field A contain duplicate values
Field B contain duplicate values
So one A links to several Bs.
And one B might link to several As (this is not always the case).
So the table contains is a many-to-many relation.
I would like to calculate a new Group - a "Field C" - in a query that would
group A and B records.
Example of desired query result:
----------------------------------------------------
A; B; C
----------------------------------------------------
1; 5; X; first group
1; 6; X; because A is 1 (duplicate)
2; 5; X; because B is 5 (duplicate)
2; 7; X; becase A is 2 and above row has B=5 and A=2.
3; 8; Y; new group as A=3 is not among previous A values and neither is 8
among B values
3; 9; Y; because A=3 is part of group
----------------------------------------------------
I'm not sure if this is easy or impossible. I have been trying to wrap my
head around this problem for a few hours now and I'm stuck.
Any ideas on how to attack this problem is warmly welcome
- Chr