Format Find Duplicate Data Differently

  • Thread starter Thread starter Sam
  • Start date Start date
S

Sam

I did a find duplicate query to find items where i have duplicates,
but i need my results formatted differently.

Sample results are as follows:
Key Fld
42811 3618
42811 3608
66662 2828
66662 2858
1828 3876
1828 3729
30523 3410
30523 3424
30523 7242
50620 6494
212 8010
212 8009
212 6843
212 6770

I need it to look like
Key Fld
42811 3618 3608
42811 3608 3618
30523 3410 3424 7242
30523 3424 3410 7242
30523 7242 3424 3410
212 8010 8009 6843 6770
212 8009 8010 6770 6843
212 6843 8009 8010 6770
212 6770 6843 8009 8010

Is this possible and if so, how?

Any help would be great.
Thanks
Samantha
 
It's fairly easy to get 2 of the values (highest and lowest), but the other
columns are more difficult.

SELECT [Key], Min([Fld]) AS MinFld, Max([Fld]) AS MaxFld
FROM Table1
GROUP BY [Key];

The trouble with the other columns is that you don't know how many there
are. Theoretically, there could be more than 255, which is not doable in
Access.

If you want to keep the one (say the lowest value), and delete the others,
this might help:
http://allenbrowne.com/subquery-01.html#DeDuplicate
 
Back
Top