Similar to the following:
I want to know how , within the MS-Access Query Design environment, I can transform the following sample data from state #1 to state #2.
Here is what the data currently look like in my table (state #1):
Row | School | LocationCode2011 | LocationCode2012 | LocationCode2013
001 ABC 1000A 1000A 2000X
002 DEF 1000A 1000A 2000X
003 GHI 2000X 1000A 2000X
Here is what I want my resulting query to look like (state #2):
Row | LocationCode | Year | School#1 | School#2 | School#3
001 1000A 2011 ABC DEF
002 1000A 2012 ABC DEF GHI
003 2000X 2011 GHI
004 2000X 2012
005 2000X 2013 ABC DEF GHI
Edit (2/19/2014): I wanted to present a simpler version (as recommended by elc below), since my previous sample data presented too many problems at once.
State #1
Row | School | LocationCode | Year |
001 ABC 1000A 2011
002 DEF 1000A 2011
003 GHI 2000X 2011
State #2
Row | LocationCode | Year | School#1 | School#2 | School#3
001 1000A 2011 ABC DEF
002 2000X 2011 GHI
Please keep in mind that:
1) I am using Access 2010