Row to Columns

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Do you have any suggestions on how I can write a single query that will move
the STATE row to a column. Giving the resolute like the example below. I
am only able to do it by separating each STATE in to multiple separate
tables. Then rejoining them back with another query.


Source Table
SKU STATE SALES
508671 UTAH $475,560
508671 NEVADA $634,464
508671 IDAHO $456,432
508721 UTAH $404,208
508721 NEVADA $240,480
508721 IDAHO $739,440
508788 UTAH $541,440
508788 NEVADA $316,416
508788 IDAHO $287,088

Query Resolute
SKU UTAH NEVADA IDAHO
508671 $475,560 $634,464 $456,432
508721 $404,208 $240,480 $739,440
508788 $541,440 $316,416 $287,088

Thank You, Kevin
 
AFSSkier said:
Do you have any suggestions on how I can write a single query that will
move
the STATE row to a column. Giving the resolute like the example below.
I
am only able to do it by separating each STATE in to multiple separate
tables. Then rejoining them back with another query.

Use the Crosstab Query Wizard.
 
Yes a crosstab does work. However, I need to do this one as a Make Table.

No problem. Create and save the crosstab query; create a MakeTable
query based on the crosstab query.

John W. Vinson[MVP]
 
Thanks for the info!

John Vinson said:
No problem. Create and save the crosstab query; create a MakeTable
query based on the crosstab query.

John W. Vinson[MVP]
 
Back
Top