<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'sql', 'SQL Server 2008', 'stored procedures', 'SQL 2008', and 'presentation'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=sql,SQL+Server+2008,stored+procedures,SQL+2008,presentation&amp;orTags=0</link><description>Search results matching tags 'sql', 'SQL Server 2008', 'stored procedures', 'SQL 2008', and 'presentation'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>High Performance Dimensional Data Loads With SSIS Presentation</title><link>http://sqlblog.com/blogs/michael_coles/archive/2010/11/20/high-performance-dimensional-data-loads-with-ssis-presentation.aspx</link><pubDate>Sat, 20 Nov 2010 18:25:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:30834</guid><dc:creator>Mike C</dc:creator><description>&lt;P&gt;Just finished giving the SSIS High-Performance Dimensional Data Load presentation at &lt;A title="SQLSaturday #59 NYC" href="http://www.sqlsaturday.com/59/schedule.aspx"&gt;SQLSaturday #59 NYC&lt;/A&gt;.&amp;nbsp; Here are the slides in PDF format.&amp;nbsp; I'll upload the Try-N-Save&amp;nbsp;code and sample data later for attendees to play with.&lt;/P&gt;
&lt;P&gt;Thanks to everyone who attended my session and thanks to Melissa D. and NJSQL for putting this together.&amp;nbsp; For those who are interested in Alejandro Mesa's composable DML solution to the problem of Type 2 dimension updates, here's the complete statement from the demo:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;INSERT INTO Dim.Geography_Hash&lt;BR&gt;(&amp;nbsp;&lt;BR&gt;&amp;nbsp;CityName, CountyFIPS, CountyName, StateFIPS, &lt;BR&gt;&amp;nbsp;StateUSPS, StateName, ZIP, TimeOffset, &lt;BR&gt;&amp;nbsp;DaylightSavingTime, StartDateID, CurrentFlag, BatchID, &lt;BR&gt;&amp;nbsp;LineageID, CubeInd, SortOrder, Hash&lt;BR&gt;)&lt;BR&gt;SELECT CityName, CountyFIPS, CountyName, StateFIPS, &lt;BR&gt;&amp;nbsp;StateUSPS, StateName, ZIP, TimeOffset, &lt;BR&gt;&amp;nbsp;DaylightSavingTime, StartDateID, CurrentFlag, BatchID, &lt;BR&gt;&amp;nbsp;LineageID, CubeInd, SortOrder, Hash&lt;BR&gt;FROM&lt;BR&gt;(&lt;BR&gt;&amp;nbsp;MERGE INTO Dim.Geography_Hash AS Target&lt;BR&gt;&amp;nbsp;USING Staging.Geography_Hash AS Source&lt;BR&gt;&amp;nbsp;ON Target.ZIP = Source.ZIP&lt;BR&gt;&amp;nbsp;&amp;nbsp;AND Target.CurrentFlag = Source.CurrentFlag&lt;BR&gt;&amp;nbsp;WHEN MATCHED AND Target.Hash &amp;lt;&amp;gt; Source.Hash&lt;BR&gt;&amp;nbsp;&amp;nbsp;THEN UPDATE SET CurrentFlag = 'N'&lt;BR&gt;&amp;nbsp;WHEN NOT MATCHED&lt;BR&gt;&amp;nbsp;&amp;nbsp;THEN INSERT &lt;BR&gt;&amp;nbsp;&amp;nbsp;(&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;CityName, CountyFIPS, CountyName, StateFIPS, &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;StateUSPS, StateName, ZIP, TimeOffset, &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;DaylightSavingTime, StartDateID, CurrentFlag, BatchID, &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;LineageID, CubeInd, SortOrder, Hash&lt;BR&gt;&amp;nbsp;&amp;nbsp;)&lt;BR&gt;&amp;nbsp;&amp;nbsp;VALUES&lt;BR&gt;&amp;nbsp;&amp;nbsp;(&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Source.CityName, Source.CountyFIPS, Source.CountyName, Source.StateFIPS, &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Source.StateUSPS, Source.StateName, Source.ZIP, Source.TimeOffset, &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Source.DaylightSavingTime, Source.StartDateID, Source.CurrentFlag, Source.BatchID, &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Source.LineageID, Source.CubeInd, Source.SortOrder, Source.Hash&lt;BR&gt;&amp;nbsp;&amp;nbsp;)&lt;BR&gt;&amp;nbsp;OUTPUT $action, inserted.CityName, inserted.CountyFIPS, inserted.CountyName, inserted.StateFIPS, &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;inserted.StateUSPS, inserted.StateName, inserted.ZIP, inserted.TimeOffset, &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;inserted.DaylightSavingTime, inserted.StartDateID, inserted.CurrentFlag, inserted.BatchID, &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;inserted.LineageID, inserted.CubeInd, inserted.SortOrder, inserted.Hash&lt;BR&gt;)&lt;BR&gt;AS T &lt;BR&gt;(&lt;BR&gt;&amp;nbsp;action, CityName, CountyFIPS, CountyName, StateFIPS, &lt;BR&gt;&amp;nbsp;StateUSPS, StateName, ZIP, TimeOffset, &lt;BR&gt;&amp;nbsp;DaylightSavingTime, StartDateID, CurrentFlag, BatchID, &lt;BR&gt;&amp;nbsp;LineageID, CubeInd, SortOrder, Hash&lt;BR&gt;)&lt;BR&gt;WHERE action = 'UPDATE';&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;As mentioned, the OUTPUT clause on the inner MERGE statement feeds the outer INSERT clause.&amp;nbsp; Next stop&amp;nbsp;is &lt;A title="SQLSaturday #61 DC" href="http://www.sqlsaturday.com/61/schedule.aspx"&gt;SQLSaturday #61 in&amp;nbsp;DC&lt;/A&gt; at the beginning of December.&lt;/P&gt;</description></item></channel></rss>