SqlShare.com Logo
 
Skip Navigation Links
Home
Video List
Events
Classes
About Us
Login / Register
Subscribe RSS Feed 

Confio Ignite

PIVOT using the PIVOT statement

Pivoting data in SQL Server is a feature used mostly by reporting queries and interfaces. This video shows you how to PIVOT data using the PIVOT statement with T-SQL in SQL Server 2005 or later.

Duration:
3 mins 40 secs
Skill Level:
200
Rating:
4.29 out of 5
Publish Date:
November 03, 2008
PIVOT using the PIVOT statement You must be logged in to view this video.  
Bookmark and Share
 
1=Poor, 3=Good, 5=Excellent

About the Author

Image of Plamen Ratchev
Plamen Ratchev has over two decades experience in the software architecture and development field. He has enjoyed building solutions for UNIX, DOS and Windows platforms, with main focus on SQL Server since version 4.21. Plamen is founder of Tangra, specializing in relational database applications analysis, implementation, and tuning. His particular interest is in design patterns, performance a...

References

There are no downloads or recommended reading links for this video

Comments
Venkata Taduri on 2/27/2009
Pretty cool.

4A5ADA4D6E on 3/18/2009
I really have not used the pivot function yet but see its usefulness. Thanks

Dean Dodson on 3/18/2009
The derived table took away clarity for the example. In my opinion, it would have been more instructive just to focus on a table with the values rather than have to use a derived table to parse out the values.

9BC3FEBE62 on 3/18/2009
Just enough detail.

Nate on 3/18/2009
Good video...Great explanation!!

Steven Swarter on 3/18/2009
Great way to learn! especially for visual learners...Technology at it's best...

lisa on 3/18/2009
This is actually something i can relate to my job, it was so handy to see that example I want to share it with my team.

FIRAT on 3/18/2009
good video

S. S. Wilson on 3/19/2009
Thanks!

John O'Brien on 3/19/2009
Wish it had covered more.

Ravikumar on 3/20/2009
It was good simple example!! THX!

Daniel Jordan on 3/20/2009
Weensy bit hard to understand the narrator.

Joe on 4/7/2009
I would like to see a video on how to create a dynamic PIVOT table. Using your example, could you use the same code show all months up to the current month automatically?

Plamen Ratchev on 4/8/2009
Joe, I have on my blog example of dynamic PIVOT using the same data as this video: http://pratchev.blogspot.com/2008/12/dynamic-pivoting.html

jayabhaskar k on 4/10/2009
cool man.

datamama on 5/15/2009
very nice. keep up the good work.

Tonci on 10/23/2009
Don't get me wrong, but it looks simpler to accomplish the way you explained pivotting with a case statement. However, maybe with a pivot operator is less code. Great again for pivotting! Thank you.

Plamen Ratchev on 10/24/2009
Tonci, the PIVOT operator syntax can be a bit challenging at first, but once you get used to it writing pivot queries can be faster.

Jim Butters on 1/12/2010
Well explained. Good job!

A2D6709F0F on 1/19/2010
Many examples are overly complex, taking focus away from the concept being explained. This example was great, in its simplicity.

Thanks Plamen, Was able to implement it right away. Nice work.

John Torrey on 4/3/2010
Excellent video and explanation, considering how short the video is. I would love to know more about the syntax and the options for the PIVOT function.

Plamen Ratchev on 4/4/2010
John, the Books Online topic on PIVOT has good examples and more detailed explanation of the options: http://msdn.microsoft.com/en-us/library/ms177410.aspx

omkar on 5/13/2010
I like the video. Asking question at he end was nice.

Dick Rosenberg on 5/20/2010
That is absolutely the cleaest explanation of the use of PIVOT that I have encountered.

A Alagu Ganesh on 8/4/2010
good

arif on 9/8/2010
easy to understand

aaron williams on 5/16/2011
this didn't explain the basics of PIVOT at all

Anil Babu on 6/16/2011
good & thanks

Jeff on 8/9/2011
As good an explanation of a PIVOT as I have heard or read anywhere.

nicely explained!

Nilesh on 8/12/2011
nice

Vinay on 8/12/2011
Nice Video, but its a static pivot, Here i know the months then its fine, suppose if my pivot columns are dynamic then how to convert the table to pivot?

John O'Sullivan on 8/12/2011
a good example of Pivot

Craig on 8/12/2011
Your videos are always great and very informative.

Jamie Portolese on 8/12/2011
Great straightforward use of the pivot command. I have this implemented but realized I made it more complicated then necessary. Will re-write the queries now. Thank you. Love the videos

arif shaw on 8/12/2011
VERY NICE

Mark Cook on 8/12/2011
Helpful. Thank you.

Manole Razvan on 8/12/2011
I want more Pivor and olap things

Frank on 8/12/2011
Thank you

Brian Conner on 8/13/2011
Loved it! was easy to follow.

Plamen Ratchev on 8/14/2011
Vinay, here is example of dynamic pivoting using the PIVOT operator: http://pratchev.blogspot.com/2008/12/dynamic-pivoting.html

John O'Sullivan on 8/14/2011
good demo of PIVOT

Max Turavani on 8/17/2011
beauty

domingo asuncion on 8/18/2011
Cool... Thank you.

Carlos B. Vasquez on 8/20/2011
Awesome!!

Dan on 8/22/2011
Good info.

saritha on 8/29/2011
very helpful

Juan Lorenzoni on 9/26/2011
Good information.

Maurice Ivory on 1/13/2012
This wasn't a bad video

Debasis on 4/29/2012
Simply superb

Uday on 3/16/2013
Haven't used this before, now I can think of using it. Thanks.



Must Be Logged In
 

How Do I Become a Video Author? |  Newsletter History

Copyright © Fourdeuce, Inc., 2005-2009. All Rights Reserved | Privacy Policy | Terms & Conditions