Run Crosstab Query - transpose data

G

Guest

I have multiple account numbers with multiple codes and need to transpose the
data.

Example data
12 a
12 b
13 a
14 a
14 b
14 c
I would like the data to look like
12 a b
13 a
14 a b c

This can be completed in Excel by adding a count to the number and using it
as a column in the crosstab query. I can not perform this in Excel due to
the row limitation.

Any help would be appreciated.
Thank you
 
D

Duane Hookom

Did you have any table or field names you could share? You could use Field1
as the Row Heading, Field2 as the Column Heading, and First of Field2 as the
Value.
 
G

Guest

This might do it for you --
TRANSFORM DK_Table.Code
SELECT DK_Table.Account
FROM DK_Table
GROUP BY DK_Table.Account
PIVOT DK_Table.Code;
 

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

Top