Data format Transform (1 Viewer)

mr moe

Registered User.
Local time
Today, 03:18
Joined
Jul 24, 2003
Messages
332
Hi I have a table in access with this format
ID Grade
1 A
5 D
6 B
1 B
5 C

need to write a query that produce the output like the format below
ID Grade1 Grade2
1 A B
5 D C
6 b

can someone please help, basically looks like the opposite of transform right?
 

plog

Banishment Pending
Local time
Yesterday, 21:18
Joined
May 11, 2011
Messages
11,643
This can be done with a sub-query to assign order to your data and then a cross-tab to format it like you want.

However, you haven't provided enough information to do this. You need a field so that a computer knows how to order your data. Do you have a field that you can apply order to? E.g. a date field, an autonymber primary key? You need a way so that a computer can know that 1 A falls into the Grade1 bucket and 1 B falls into the Grade2 bucket.
 

isladogs

MVP / VIP
Local time
Today, 03:18
Joined
Jan 14, 2017
Messages
18,212
I've sort of done it with just a crosstab query.



It's not perfect but perhaps its good enough?
As plog said, you need a PK field as well.

Alternatively you could concatenate the values with a space as separator
 

Attachments

  • Capture.PNG
    Capture.PNG
    6.6 KB · Views: 140
  • Database2.accdb
    380 KB · Views: 59

Users who are viewing this thread

Top Bottom