Solved

SQL PIVOT AND UNPIVOT Combination

Posted on 2011-03-18
2
671 Views
Last Modified: 2012-05-11
Please can you advise if there is some way of combining UNPIVOT and PIVOT.  I'm able to UNPIVOT a data set but then need to PIVOT the values for each unpivotted category across a series of months.

Thanks
0
Comment
Question by:Damozz
  • 2
2 Comments
 
LVL 9

Accepted Solution

by:
mayank_joshi earned 500 total points
Comment Utility
0
 
LVL 9

Expert Comment

by:mayank_joshi
Comment Utility
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now