<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Elven Soft Blog &#187; unpivot</title>
	<atom:link href="http://blog.elvensoft.ro/tag/unpivot/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.elvensoft.ro</link>
	<description>Microsoft.net, marketing, software and internet solutions</description>
	<lastBuildDate>Tue, 13 Dec 2011 09:14:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Unpivot transformation</title>
		<link>http://blog.elvensoft.ro/2010/05/unpivot-transformation/</link>
		<comments>http://blog.elvensoft.ro/2010/05/unpivot-transformation/#comments</comments>
		<pubDate>Tue, 04 May 2010 18:05:10 +0000</pubDate>
		<dc:creator>Puiu</dc:creator>
				<category><![CDATA[SSIS]]></category>
		<category><![CDATA[unpivot]]></category>

		<guid isPermaLink="false">http://blog.elvensoft.ro/?p=72</guid>
		<description><![CDATA[We have the following excel file that has﻿ a pivot table in it:

The first column represents the age (A) while in the columns starting from B to D is the pivoted data. The column names are 10, 11 and 12. In order for SSIS to recognize the numbers as column names you must put a &#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>We have the following excel file that has﻿ a pivot table in it:</p>
<p><img src="http://blog.elvensoft.ro/wp-content/uploads/2010/05/Capture2.jpg" alt="Excel Pivot table" width="311" height="138" /></p>
<p>The first column represents the age (A) while in the columns starting from B to D is the pivoted data. The column names are 10, 11 and 12. In order for SSIS to recognize the numbers as column names you must put a &#8221; &#8216; &#8221; in front of the number, like this: &#8216;10.</p>
<p>Next we open SSIS and create a new project. We add a Data Flow task and in the data flow area we add an Excel source and a unpivot transformation like below:</p>
<p><img src="http://blog.elvensoft.ro/wp-content/uploads/2010/05/Data_flow.jpg" alt="" width="215" height="189" /></p>
<p><span id="more-72"></span></p>
<p>The red x appears because we have not edited the transformation yet. Let&#8217;s do that:</p>
<p style="text-align: center;"><img class="aligncenter" src="http://blog.elvensoft.ro/wp-content/uploads/2010/05/Unpivot-transformation.jpg" alt="" width="447" height="432" /></p>
<p>In the Available Input Columns we do not check the columns that we want to remain unchanged. Here we do not want the first column, &#8220;Age&#8221;, to be changed (unpivoted).</p>
<p>The <strong>destination column</strong> in the table reprezents the new column where the pivoted values will be stored.</p>
<p>The pivot key column name is the column where the name of the columns will be stored, in our case 10, 11, 12.</p>
<p>After we&#8217;ve done all this we can have another excel file or table as a destination for our results.</p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elvensoft.ro/2010/05/unpivot-transformation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

