<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Pivot&#8230;. I said PIVOT!!!!</title>
	<atom:link href="http://benchmarkitconsulting.com/colin-stasiuk/2009/01/28/pivot-i-said-pivot/feed/" rel="self" type="application/rss+xml" />
	<link>http://benchmarkitconsulting.com/colin-stasiuk/2009/01/28/pivot-i-said-pivot/</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 15:10:28 -0700</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Now syndicating Colin Stasiuk and Tim Ford &#124; Brent Ozar - SQL Server DBA</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2009/01/28/pivot-i-said-pivot/comment-page-1/#comment-4211</link>
		<dc:creator>Now syndicating Colin Stasiuk and Tim Ford &#124; Brent Ozar - SQL Server DBA</dc:creator>
		<pubDate>Sat, 05 Sep 2009 18:33:32 +0000</pubDate>
		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=359#comment-4211</guid>
		<description>[...] Doing Pivot Tables in SQL Server &#8211; if your data is organized by row, and you need it in columns instead, then you need a pivot table.  Colin gives an example. [...]</description>
		<content:encoded><![CDATA[<p>[...] Doing Pivot Tables in SQL Server &#8211; if your data is organized by row, and you need it in columns instead, then you need a pivot table.  Colin gives an example. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How To: Summarize Aggregated Data Using Pivot in TSQL &#171; Dangling On The Shoulders Of Giants</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2009/01/28/pivot-i-said-pivot/comment-page-1/#comment-3687</link>
		<dc:creator>How To: Summarize Aggregated Data Using Pivot in TSQL &#171; Dangling On The Shoulders Of Giants</dc:creator>
		<pubDate>Wed, 04 Feb 2009 16:48:30 +0000</pubDate>
		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=359#comment-3687</guid>
		<description>[...] http://benchmarkitconsulting.com/colin-stasiuk/2009/01/28/pivot-i-said-pivot/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://benchmarkitconsulting.com/colin-stasiuk/2009/01/28/pivot-i-said-pivot/" rel="nofollow">http://benchmarkitconsulting.com/colin-stasiuk/2009/01/28/pivot-i-said-pivot/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin Stasiuk</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2009/01/28/pivot-i-said-pivot/comment-page-1/#comment-3646</link>
		<dc:creator>Colin Stasiuk</dc:creator>
		<pubDate>Tue, 03 Feb 2009 12:36:24 +0000</pubDate>
		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=359#comment-3646</guid>
		<description>Srinivas

great catch... the example I pulled does do more work &quot;by hand&quot; then is required.  Post Updated and thanks!!</description>
		<content:encoded><![CDATA[<p>Srinivas</p>
<p>great catch&#8230; the example I pulled does do more work &#8220;by hand&#8221; then is required.  Post Updated and thanks!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Srinivas</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2009/01/28/pivot-i-said-pivot/comment-page-1/#comment-3645</link>
		<dc:creator>Srinivas</dc:creator>
		<pubDate>Tue, 03 Feb 2009 09:34:30 +0000</pubDate>
		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=359#comment-3645</guid>
		<description>PIVOT itself aggregate, Not sure why you are doing by hand 

SELECT 
      [1] AS &#039;January&#039;
     ,[2] AS &#039;February&#039;
     ,[3] AS &#039;March&#039;
     ,[4] AS &#039;April&#039;
     ,[5] AS &#039;May&#039;
     ,[6] AS &#039;June&#039;
     ,[7] AS &#039;July&#039;
     ,[8] AS &#039;August&#039;
     ,[9] AS &#039;September&#039;
     ,[10] AS &#039;October&#039;
     ,[11] AS &#039;November&#039;
     ,[12] AS &#039;December&#039;
FROM (
     SELECT 
               MONTH(OrderDate)     AS &#039;MonthNumber&#039;,
               OrderID             
          FROM Sales.SalesOrderHeader
          WHERE YEAR(OrderDate) = 2002
          
     ) AS Data
PIVOT(
          COUNT(OrderID)
          FOR MonthNumber IN([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12])
     ) AS PVT</description>
		<content:encoded><![CDATA[<p>PIVOT itself aggregate, Not sure why you are doing by hand </p>
<p>SELECT<br />
      [1] AS &#8216;January&#8217;<br />
     ,[2] AS &#8216;February&#8217;<br />
     ,[3] AS &#8216;March&#8217;<br />
     ,[4] AS &#8216;April&#8217;<br />
     ,[5] AS &#8216;May&#8217;<br />
     ,[6] AS &#8216;June&#8217;<br />
     ,[7] AS &#8216;July&#8217;<br />
     ,[8] AS &#8216;August&#8217;<br />
     ,[9] AS &#8216;September&#8217;<br />
     ,[10] AS &#8216;October&#8217;<br />
     ,[11] AS &#8216;November&#8217;<br />
     ,[12] AS &#8216;December&#8217;<br />
FROM (<br />
     SELECT<br />
               MONTH(OrderDate)     AS &#8216;MonthNumber&#8217;,<br />
               OrderID<br />
          FROM Sales.SalesOrderHeader<br />
          WHERE YEAR(OrderDate) = 2002</p>
<p>     ) AS Data<br />
PIVOT(<br />
          COUNT(OrderID)<br />
          FOR MonthNumber IN([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12])<br />
     ) AS PVT</p>
]]></content:encoded>
	</item>
</channel>
</rss>

