Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Multiple Pivots Expand / Collapse
Author
Message
Posted Friday, September 6, 2013 2:23 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 12:42 PM
Points: 212, Visits: 622
I need to display data in a pivot style for all 12 months for each of the company's that match a criteria .
so the output will be:

Company 1:

Month 12 month 11 month 10.......
data data data


Company 2:
Month 12 month 11 month 10.......
data data data



Company 3:
Month 12 month 11 month 10.......
data data data




Is there a way to display all the company's with their respective pivots?? How do I design it.
I can do so for one company but not all...


Kindly advise.
Post #1492417
Posted Friday, September 6, 2013 2:46 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 2:50 PM
Points: 13,062, Visits: 11,891
Without more information than that it is pretty difficult to provide much of a detailed answer...and this question requires a detailed answer.

Please take a few minutes and the read the first article in my signature for best practices when posting questions.


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1492428
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse