<?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>SSIS Junkie : video, For Each Loop, ssis</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/tags/video/For+Each+Loop/ssis/default.aspx</link><description>Tags: video, For Each Loop, ssis</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Looping over SQL scripts and executing them : SSIS video nugget</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2010/02/25/looping-over-sql-scripts-and-executing-them-ssis-video-nugget.aspx</link><pubDate>Wed, 24 Feb 2010 23:02:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:22604</guid><dc:creator>jamiet</dc:creator><slash:comments>12</slash:comments><comments>http://sqlblog.com/blogs/jamie_thomson/comments/22604.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/jamie_thomson/commentrss.aspx?PostID=22604</wfw:commentRss><wfw:comment>http://sqlblog.com/blogs/jamie_thomson/rsscomments.aspx?PostID=22604</wfw:comment><description>&lt;P&gt;Earlier today while surfing the &lt;A href="http://social.msdn.microsoft.com/forums/en-US/sqlintegrationservices/threads/" target=_blank&gt;SSIS forum on MSDN&lt;/A&gt; I noticed a question that asked &lt;A href="http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/8765da99-edc4-4b64-a2dc-952da8a68c42" target=_blank&gt;how one could execute a series of .sql files using SSIS&lt;/A&gt;. One suggested approach was to read the contents of the file(s) into a variable using a Script Task and then execute the contents of that variable using an Execute SQL Task. Well, that would work but there is actually a much quicker and easier way and given that at least two people on that thread didn’t know about it I thought it might be worth putting together a little demo.&lt;/P&gt;
&lt;P&gt;I’ve produced a video, embedded below, that demonstrates this technique. Quite simply it loops over the .sql files in question and points the Execute SQL Task &lt;I&gt;directly&lt;/I&gt; at those files which saves us from having to read the file contents into a variable. The video is 5m31s long:&lt;/P&gt;&lt;EMBED style="WIDTH:600px;HEIGHT:450px;" src=http://vimeo.com/moogaloop.swf?clip_id=9714659&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=00ADEF&amp;amp;fullscreen=1 allowfullscreen="true"&gt; 
&lt;P&gt;If the video is not showing up for whatever reason then you can go and view it over at &lt;A title=http://vimeo.com/9714659 href="http://vimeo.com/9714659" target=_blank&gt;http://vimeo.com/9714659&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;That’s it, hope it was useful! Over on &lt;A href="http://consultingblogs.emc.com/jamiethomson/" target=_blank&gt;my old blog&lt;/A&gt; I used to produce a lot of these how-to blog posts and I termed them &lt;A href="http://consultingblogs.emc.com/jamiethomson/archive/tags/SSIS/Nugget/default.aspx" target=_blank&gt;SSIS Nuggets&lt;/A&gt; – I liked the connotation of them being bite-sized bits of info that you could easily consume. I’d like to get back into producing SSIS nuggets and I reckon that videos like this could be a useful way of communicating them. Does that sound like a good idea? Let me know in the comments!&lt;/P&gt;
&lt;P&gt;&lt;A href="http://twitter.com/jamiet" target=_blank&gt;@Jamiet&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=22604" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/For+Each+Loop/default.aspx">For Each Loop</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/nugget/default.aspx">nugget</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/sql+server+integration+services/default.aspx">sql server integration services</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/ssis/default.aspx">ssis</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/video/default.aspx">video</category></item></channel></rss>