September 6, 2013 at 2:23 pm
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.
September 6, 2013 at 2:46 pm
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 Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply