Query to group duplicates



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


.



Relevant Pages

  • grouping same rows in report
    ... there are duplicate names each with it's own data. ... What I would like to do is first group all these same rows together. ... then be able to display rows ...
    (microsoft.public.excel.programming)
  • Re: For Frank Krygowskis helmet files
    ... that you duplicate the experiments and report back. ... The matter is tangential forces on the neck from head strikes. ... forces of scalp and helmet scale to high energy impacts. ...
    (rec.bicycles.tech)
  • Re: OT - how not to get captured and beheaded in Iraq
    ... >> section is a duplicate of last week's. ... > Off with his head. ... I've just been picking my nose to extract all the bogies that have ...
    (uk.media.tv.misc)
  • Re: TMTOWTDI
    ... dispatch table ... head right on over to the solution: ...
    (comp.lang.perl.misc)
  • Re: Unique entry
    ... last symbol I key is a duplicate I am stuck! ... I key the symbol - hit tab & get this message: ... Prev by Date: ...
    (microsoft.public.access.forms)