Crosstab Query - More Than Two Values?

  • Thread starter Thread starter Leviathan via AccessMonster.com
  • Start date Start date
L

Leviathan via AccessMonster.com

I have some data that I need to flatten by a particular field, but it is
duping up to 7 times due to one field. Unfortunately, the value of these
fields is different for each unique record, so a simple crosstab will not
work. Here's an example

Field to Flatten Duping Field
XXX ABC
XXX BCA
XXX CAB
YYY JDK
YYY KJD

If there were only two dupes per "field to flatten" i could use "FIRST" and
"LAST" or "MIN" and "MAX", but I'm dealing with more than that. Is there a
way I can get this:

Field to Flatten Dupe #1 Dupe #2
Dupe #3
XXX ABC BCA
CAB
YYY JDK KJD

Thanks in advance for any help!
 
Bottom part should look like this:

Field to Flatten Dupe #1 Dupe #2 Dupe #3
XXX ABC BCA CAB
YYY JDK KJD
 
Best way I know of is to use a group ranking to a temporary table and then a
crosstab query. If you try to use a crosstab on a ranking query it will
fail due to alias table names.
 
Back
Top