Crosstab Query - More Than Two Values?

  • Thread starter Leviathan via AccessMonster.com
  • 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!
 
L

Leviathan via AccessMonster.com

Bottom part should look like this:

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

Guest

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.
 

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

Similar Threads


Top