Manipulate data

In the attached file, Sheet1 shows how my data is currently laid out.  I would like to change the layout to how it is shown in Sheet2.  In Sheet2 the sequence of the rows does not matter.  

Can this be done in MS Access?

Note that the data in my "real" file has a lot more rows and columns of data than the sample data in the attached file. Thanks.  
EE01.xlsx
RishiSingh05Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David ToddSenior DBACommented:
Hi,

If you have only 50 states it won't look pretty, but is doable I believe

select prodname, tiers, CA as rate, 'CA' as state

union all

select prodname, tiers, NC as rate, 'NC' as state
 
...

What you are trying to do is unpivot sheet1 to a normallised sheet2. SQL 2005 introduced the pivot and unpivot operators, but not sure about access.

Regards
  David
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.