<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Systems Engineering and RDBMS</title>
	<atom:link href="http://decipherinfosys.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://decipherinfosys.wordpress.com</link>
	<description></description>
	<lastBuildDate>Wed, 25 Nov 2009 13:07:12 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='decipherinfosys.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/a1338244b8e44d57d83b1634936133f5?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Systems Engineering and RDBMS</title>
		<link>http://decipherinfosys.wordpress.com</link>
	</image>
			<item>
		<title>A very Happy Thanksgiving</title>
		<link>http://decipherinfosys.wordpress.com/2009/11/25/a-very-happy-thanksgiving/</link>
		<comments>http://decipherinfosys.wordpress.com/2009/11/25/a-very-happy-thanksgiving/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 13:07:12 +0000</pubDate>
		<dc:creator>decipherinfosys</dc:creator>
				<category><![CDATA[Decipher News]]></category>

		<guid isPermaLink="false">http://decipherinfosys.wordpress.com/?p=2430</guid>
		<description><![CDATA[To all our readers in the USA, we wish you and your loved ones a very Happy Thanksgiving.  To the readers around the world, here is the link from Wikipedia to learn more about this festival:
http://en.wikipedia.org/wiki/Thanksgiving
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2430&subd=decipherinfosys&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>To all our readers in the USA, we wish you and your loved ones a very Happy Thanksgiving.  To the readers around the world, here is the link from Wikipedia to learn more about this festival:</p>
<p><a href="http://en.wikipedia.org/wiki/Thanksgiving">http://en.wikipedia.org/wiki/Thanksgiving</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decipherinfosys.wordpress.com/2430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decipherinfosys.wordpress.com/2430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decipherinfosys.wordpress.com/2430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decipherinfosys.wordpress.com/2430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decipherinfosys.wordpress.com/2430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decipherinfosys.wordpress.com/2430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decipherinfosys.wordpress.com/2430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decipherinfosys.wordpress.com/2430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decipherinfosys.wordpress.com/2430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decipherinfosys.wordpress.com/2430/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2430&subd=decipherinfosys&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://decipherinfosys.wordpress.com/2009/11/25/a-very-happy-thanksgiving/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0409e90c82255ecb867b436a97e4f779?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">decipherinfosys</media:title>
		</media:content>
	</item>
		<item>
		<title>SSMS &#8211; Tracing a Session in Profiler</title>
		<link>http://decipherinfosys.wordpress.com/2009/11/24/ssms-tracing-a-session-in-profiler/</link>
		<comments>http://decipherinfosys.wordpress.com/2009/11/24/ssms-tracing-a-session-in-profiler/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 18:31:53 +0000</pubDate>
		<dc:creator>decipherinfosys</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://decipherinfosys.wordpress.com/?p=2425</guid>
		<description><![CDATA[SQL Server management studio in SQL Server 2008 has a neat little feature called &#8220;Trace Query in SQL Server Profiler&#8221;.   Using this option, one can start a profiler trace right from SSMS and the trace that gets started is already filtered on the spid of that particular session.  This option is present under the Query [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2425&subd=decipherinfosys&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>SQL Server management studio in SQL Server 2008 has a neat little feature called &#8220;Trace Query in SQL Server Profiler&#8221;.   Using this option, one can start a profiler trace right from SSMS and the trace that gets started is already filtered on the spid of that particular session.  This option is present under the Query Option of the Menu:</p>
<p><a href="http://decipherinfosys.files.wordpress.com/2009/11/ssms_pf1.jpg"><img class="aligncenter size-full wp-image-2426" title="SSMS_PF1" src="http://decipherinfosys.files.wordpress.com/2009/11/ssms_pf1.jpg?w=395&#038;h=476" alt="" width="395" height="476" /></a></p>
<p>As you can see, it also has a short cut key: Ctrl + Alt + P.  When you select this, a profiler window will open and if you look at it&#8217;s properties and then the filter, you will see that it has put a filter on your specific SPID for you:</p>
<p><a href="http://decipherinfosys.files.wordpress.com/2009/11/ssms_pf2.jpg"><img class="aligncenter size-full wp-image-2427" title="SSMS_PF2" src="http://decipherinfosys.files.wordpress.com/2009/11/ssms_pf2.jpg?w=405&#038;h=317" alt="" width="405" height="317" /></a>The very next question then that comes to mind is what events is it tracking and what columns is it using?  The default template that it uses for the events and columns is &#8220;TSQL_SPs&#8221; &#8211; you can see this by clicking on properties of the trace that it started for you.  This is one of the templates that comes with the install.  You can modify this template and customize it to your needs.  All you need to do is open it up from Profiler and go to File\Templates\Edit Templates, make the changes and save it.</p>
<p>This is a pretty handy feature and can help a great deal when tuning SQL code in SSMS.  One can get all the detailed information at the click of the button now.</p>
<p><strong>Resources</strong>:</p>
<ul>
<li>SQL Server MSDN profiler reference &#8211; <a href="http://msdn.microsoft.com/en-us/library/ms173757.aspx">here</a>.</li>
</ul>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decipherinfosys.wordpress.com/2425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decipherinfosys.wordpress.com/2425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decipherinfosys.wordpress.com/2425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decipherinfosys.wordpress.com/2425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decipherinfosys.wordpress.com/2425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decipherinfosys.wordpress.com/2425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decipherinfosys.wordpress.com/2425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decipherinfosys.wordpress.com/2425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decipherinfosys.wordpress.com/2425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decipherinfosys.wordpress.com/2425/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2425&subd=decipherinfosys&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://decipherinfosys.wordpress.com/2009/11/24/ssms-tracing-a-session-in-profiler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0409e90c82255ecb867b436a97e4f779?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">decipherinfosys</media:title>
		</media:content>

		<media:content url="http://decipherinfosys.files.wordpress.com/2009/11/ssms_pf1.jpg" medium="image">
			<media:title type="html">SSMS_PF1</media:title>
		</media:content>

		<media:content url="http://decipherinfosys.files.wordpress.com/2009/11/ssms_pf2.jpg" medium="image">
			<media:title type="html">SSMS_PF2</media:title>
		</media:content>
	</item>
		<item>
		<title>Consolidating SQL Server Environments</title>
		<link>http://decipherinfosys.wordpress.com/2009/11/23/consolidating-sql-server-environments/</link>
		<comments>http://decipherinfosys.wordpress.com/2009/11/23/consolidating-sql-server-environments/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 14:10:21 +0000</pubDate>
		<dc:creator>decipherinfosys</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://decipherinfosys.wordpress.com/?p=2423</guid>
		<description><![CDATA[Consolidation is one of the most important topics nowadays in IT/Dev/Production environments.  There are a lot of options available to sysadmins, DBAs and Developers to consolidate their environments with the key one being virtualization.  For SQL Server consolidation also, there are several different options &#8211; multiple instances on a server or moving databases to a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2423&subd=decipherinfosys&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Consolidation is one of the most important topics nowadays in IT/Dev/Production environments.  There are a lot of options available to sysadmins, DBAs and Developers to consolidate their environments with the key one being virtualization.  For SQL Server consolidation also, there are several different options &#8211; multiple instances on a server or moving databases to a single instance for applications that share the same kind of instance requirements, using a virtualized environment etc.</p>
<p>Here is an excellent whitepaper on this topic from MSFT:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ee692366.aspx">http://msdn.microsoft.com/en-us/library/ee692366.aspx</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decipherinfosys.wordpress.com/2423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decipherinfosys.wordpress.com/2423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decipherinfosys.wordpress.com/2423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decipherinfosys.wordpress.com/2423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decipherinfosys.wordpress.com/2423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decipherinfosys.wordpress.com/2423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decipherinfosys.wordpress.com/2423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decipherinfosys.wordpress.com/2423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decipherinfosys.wordpress.com/2423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decipherinfosys.wordpress.com/2423/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2423&subd=decipherinfosys&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://decipherinfosys.wordpress.com/2009/11/23/consolidating-sql-server-environments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0409e90c82255ecb867b436a97e4f779?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">decipherinfosys</media:title>
		</media:content>
	</item>
		<item>
		<title>Joomla Installation</title>
		<link>http://decipherinfosys.wordpress.com/2009/11/14/joomla-installation/</link>
		<comments>http://decipherinfosys.wordpress.com/2009/11/14/joomla-installation/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 15:33:06 +0000</pubDate>
		<dc:creator>decipherinfosys</dc:creator>
				<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://decipherinfosys.wordpress.com/?p=2421</guid>
		<description><![CDATA[For one of the projects at a client site, the client had asked us to look into building a customized CMS for them.  We are looking at a couple of different options that are available including using drupal, joomla, MOSS, ektron&#8217;s solution etc..  Last night, when doing the installation for the first time for Joomla, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2421&subd=decipherinfosys&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>For one of the projects at a client site, the client had asked us to look into building a customized CMS for them.  We are looking at a couple of different options that are available including using drupal, joomla, MOSS, ektron&#8217;s solution etc..  Last night, when doing the installation for the first time for Joomla, after having installed the WAMP server and then unzipping the joomla 1.5 download in the www folder, we made the mistake of just re-naming the default configuration.php-dist file that comes with the install to configuration.php.</p>
<p>As a result, we were always getting the error of deleting the installation folder before it would allow the install to move forward.  In one of the forums a senior joomla developer suggested to simply re-name that file and configure it through the GUI which will create the new configuration.php file.  And that worked.  Now, we are all set to play with this wonderful CMS and see it&#8217;s capabilities.  Being a MSFT technologies shop, we might want to move to MOSS however for this project since the client wants some of the features that are already available in some open source CMS, we might go with an open source solution for this project not to mention that the costs will be less also.  Needless to state that we will be outsourcing that work to our off-shore partner since we do not have the open source capabilities in-house.  But this will be a good learning experience and we are looking forward to it.  Here are some helpful links for those evaluating Joomla:</p>
<p><a href="http://help.joomla.org/">http://help.joomla.org/</a></p>
<p><a href="http://forum.joomla.org/">http://forum.joomla.org/</a></p>
<p><a href="http://docs.joomla.org/Beginners">http://docs.joomla.org/Beginners</a></p>
<p><a href="http://downloads.joomlacode.org/docmanfileversion/1/7/4/17471/1.5_Installation_Manual_version_0.5.pdf">http://downloads.joomlacode.org/docmanfileversion/1/7/4/17471/1.5_Installation_Manual_version_0.5.pdf</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decipherinfosys.wordpress.com/2421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decipherinfosys.wordpress.com/2421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decipherinfosys.wordpress.com/2421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decipherinfosys.wordpress.com/2421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decipherinfosys.wordpress.com/2421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decipherinfosys.wordpress.com/2421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decipherinfosys.wordpress.com/2421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decipherinfosys.wordpress.com/2421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decipherinfosys.wordpress.com/2421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decipherinfosys.wordpress.com/2421/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2421&subd=decipherinfosys&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://decipherinfosys.wordpress.com/2009/11/14/joomla-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0409e90c82255ecb867b436a97e4f779?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">decipherinfosys</media:title>
		</media:content>
	</item>
		<item>
		<title>Minimally logged and the recovery model</title>
		<link>http://decipherinfosys.wordpress.com/2009/11/09/minimally-logged-and-the-recovery-model/</link>
		<comments>http://decipherinfosys.wordpress.com/2009/11/09/minimally-logged-and-the-recovery-model/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 13:10:01 +0000</pubDate>
		<dc:creator>decipherinfosys</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://decipherinfosys.wordpress.com/?p=2419</guid>
		<description><![CDATA[Yesterday, while attending a conference call related to a production issue at a client site, we had to emphasize to the client DBA one of the concepts related to minimally logged operation.  It is well documented, however people tend to miss this information.
In SQL Server, there are several minimally logged operations which essentially means that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2419&subd=decipherinfosys&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Yesterday, while attending a conference call related to a production issue at a client site, we had to emphasize to the client DBA one of the concepts related to minimally logged operation.  It is well documented, however people tend to miss this information.</p>
<p>In SQL Server, there are several minimally logged operations which essentially means that only enough information  is logged to be able to recover the transaction and point in time recovery is not supported for those minimal logged operations.  Such operations are typically used for bulk data processing.  <strong>Key point to remember is that if you are running under the FULL recovery model, ALL the operations are fully logged including the operations that are supposed to do minimal logging</strong>.  You need to be in the simple or bulk logged recovery model in order to take advantage of the minimally logged operations.</p>
<p>As far as the inserts go, the minimal logged operations are: BULK INSERT, bcp, SELECT &#8230; INTO and in SQL Server 2008 &#8211; INSERT &#8230; SELECT.   But there are certain pre-requisites for these operations to be minimally logged which you can read more on from the BOL link below.  There are some index DDL operations and also inserts/updates to the text/ntext/image data type columns that can be minimally logged.</p>
<p>You can read more on this topic from BOL &#8211; <a href="http://msdn.microsoft.com/en-us/library/ms191244.aspx">here</a> and <a href="http://msdn.microsoft.com/en-us/library/ms190422.aspx">here</a>.  And if you are a subscriber of the SQL Server Magazine, there is an excellent article by MVP Itzik Ben Gan on minimally logged inserts &#8211; <a href="http://www.sqlmag.com/Articles/ArticleID/102462/pg/8/8.html">here</a>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decipherinfosys.wordpress.com/2419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decipherinfosys.wordpress.com/2419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decipherinfosys.wordpress.com/2419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decipherinfosys.wordpress.com/2419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decipherinfosys.wordpress.com/2419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decipherinfosys.wordpress.com/2419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decipherinfosys.wordpress.com/2419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decipherinfosys.wordpress.com/2419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decipherinfosys.wordpress.com/2419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decipherinfosys.wordpress.com/2419/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2419&subd=decipherinfosys&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://decipherinfosys.wordpress.com/2009/11/09/minimally-logged-and-the-recovery-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0409e90c82255ecb867b436a97e4f779?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">decipherinfosys</media:title>
		</media:content>
	</item>
		<item>
		<title>Outlook Attachment Reminder</title>
		<link>http://decipherinfosys.wordpress.com/2009/10/23/outlook-attachment-reminder/</link>
		<comments>http://decipherinfosys.wordpress.com/2009/10/23/outlook-attachment-reminder/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 16:47:35 +0000</pubDate>
		<dc:creator>decipherinfosys</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://decipherinfosys.wordpress.com/?p=2416</guid>
		<description><![CDATA[This was sent by a friend and is a helpful tip that one can use in their day to day work life so we are posting it here.   He wrote:
Sometimes we forget to attach an attachment that we meant to send in the Outlook email. I found a small macro program that checks for the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2416&subd=decipherinfosys&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This was sent by a friend and is a helpful tip that one can use in their day to day work life so we are posting it here.   He wrote:</p>
<p><em>Sometimes we forget to attach an attachment that we meant to send in the Outlook email. I found a small macro program that checks for the actual attachment file when it sees a keyword “attach” in your message body before sending the email. If doesn’t see the attachment file, it shows an alert similar to shown below:</em></p>
<p><em><img class="aligncenter size-full wp-image-2417" title="Outlook" src="http://decipherinfosys.files.wordpress.com/2009/10/outlook.jpg?w=310&#038;h=140" alt="Outlook" width="310" height="140" /></em></p>
<p><em>The script and the instructions are available from Mark Bird&#8217;s google page over here:</em></p>
<p><a href="http://mark.bird.googlepages.com/home">http://mark.bird.googlepages.com/home</a></p>
<p>A simple and helpful tip indeed.  Thanks Mark.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decipherinfosys.wordpress.com/2416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decipherinfosys.wordpress.com/2416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decipherinfosys.wordpress.com/2416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decipherinfosys.wordpress.com/2416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decipherinfosys.wordpress.com/2416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decipherinfosys.wordpress.com/2416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decipherinfosys.wordpress.com/2416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decipherinfosys.wordpress.com/2416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decipherinfosys.wordpress.com/2416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decipherinfosys.wordpress.com/2416/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2416&subd=decipherinfosys&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://decipherinfosys.wordpress.com/2009/10/23/outlook-attachment-reminder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0409e90c82255ecb867b436a97e4f779?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">decipherinfosys</media:title>
		</media:content>

		<media:content url="http://decipherinfosys.files.wordpress.com/2009/10/outlook.jpg" medium="image">
			<media:title type="html">Outlook</media:title>
		</media:content>
	</item>
		<item>
		<title>listagg() &#8211; new analytic function in Oracle 11g R2</title>
		<link>http://decipherinfosys.wordpress.com/2009/10/20/listagg-new-analytic-function-in-oracle-11g-r2/</link>
		<comments>http://decipherinfosys.wordpress.com/2009/10/20/listagg-new-analytic-function-in-oracle-11g-r2/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 22:03:27 +0000</pubDate>
		<dc:creator>decipherinfosys</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://decipherinfosys.wordpress.com/?p=2414</guid>
		<description><![CDATA[We all have used different methods in order to get a concatenated list of values from a column &#8211; pivoting it out, using SYS_CONNECT_BY_PATH function which was introduced in Oracle 10g R1, writing our own functions to do it etc..  In SQL Server also, using XML PATH, one can do it easily as illustrated in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2414&subd=decipherinfosys&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We all have used different methods in order to get a concatenated list of values from a column &#8211; pivoting it out, using SYS_CONNECT_BY_PATH function which was introduced in Oracle 10g R1, writing our own functions to do it etc..  In SQL Server also, using XML PATH, one can do it easily as illustrated in some of our posts before &#8211; one of them is <a href="http://decipherinfosys.wordpress.com/2008/03/21/getting-the-list-of-columns-for-a-table/">here</a>.</p>
<p>Oracle 11gR2 now has a new analytic function called listagg() for doing the list aggregation.  So, now all that we need to specify is the name of the column and the separator string that will separate the different values.  Here is the link to the 11gR2 documentation on this wonderful function along with some examples to help illustrate it&#8217;s usefulness:</p>
<p><a href="http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/functions087.htm">http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/functions087.htm</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decipherinfosys.wordpress.com/2414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decipherinfosys.wordpress.com/2414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decipherinfosys.wordpress.com/2414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decipherinfosys.wordpress.com/2414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decipherinfosys.wordpress.com/2414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decipherinfosys.wordpress.com/2414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decipherinfosys.wordpress.com/2414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decipherinfosys.wordpress.com/2414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decipherinfosys.wordpress.com/2414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decipherinfosys.wordpress.com/2414/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2414&subd=decipherinfosys&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://decipherinfosys.wordpress.com/2009/10/20/listagg-new-analytic-function-in-oracle-11g-r2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0409e90c82255ecb867b436a97e4f779?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">decipherinfosys</media:title>
		</media:content>
	</item>
		<item>
		<title>Splitting a number of rows into equal groups</title>
		<link>http://decipherinfosys.wordpress.com/2009/10/16/splitting-a-number-of-rows-into-equal-groups/</link>
		<comments>http://decipherinfosys.wordpress.com/2009/10/16/splitting-a-number-of-rows-into-equal-groups/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 12:35:53 +0000</pubDate>
		<dc:creator>decipherinfosys</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://decipherinfosys.wordpress.com/?p=2409</guid>
		<description><![CDATA[At the client site yesterday, one of the developers asked this question: &#8220;I want to take the large set of the data that I have in my gigantic table and split it up into balanced non-overlapping sets.  I want the starting value in the set, the ending value and the number of records in that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2409&subd=decipherinfosys&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>At the client site yesterday, one of the developers asked this question: &#8220;<em><span style="color:#993366;">I want to take the large set of the data that I have in my gigantic table and split it up into balanced non-overlapping sets.  I want the starting value in the set, the ending value and the number of records in that group.  I need this to do my data processing logic for starting parallel concurrent processing of those large data sets.  What is the best way to achieve this?</span></em>&#8220;</p>
<p>This client site uses both Oracle and SQL Server so the solution had to work with both the RDBMS.  Luckily enough, there is an analytic function in both which does this very easily for us.  The function that we are talking about is NTILE().  Let&#8217;s take this up with an example:</p>
<p><strong>SQL Server</strong>:</p>
<p>Let&#8217;s say that I want to split all the objects in sys.objects into say 10 different non-overlapping sets.  And then as per the requirement, I need to list out the starting value in the set, the ending value and the total count of the records in the set.  Here is a simple code sample that will do that:</p>
<p>select<br />
min(object_id) as Starting_Value<br />
,    max(object_id) as Ending_Value<br />
,    count(*)       as Total_Records<br />
,    grp_nbr           as Group_Nbr<br />
from<br />
(<br />
select object_id,<br />
ntile(10) over (order by object_id) grp_nbr<br />
from SYS.OBJECTS<br />
) AS IV<br />
group by grp_nbr;</p>
<p>What I get as the output in my test database is this:</p>
<pre>Starting_Value Ending_Value Total_Records Group_Nbr
-------------- ------------ ------------- --------------------
4              125243501    123           1
128719511      366624349    123           2
367340373      571865104    123           3
574625090      767341798    122           4
768721791      971150505    122           5
971866529      1163151189   122           6
1165247206     1403152044   122           7
1406628054     1707153127   122           8
1709249144     1941581955   122           9
1943677972     2144726693   122           10
</pre>
<p>Now, you will notice that not all sets have equal records but they are pretty close.  That is by definition of the NTILE() function.  Here is what BOL states:</p>
<p><span style="color:#993366;"><em>If the number of rows in a partition is not divisible by </em><em>expression, this will cause groups of two sizes that differ by one  member. Larger groups come before smaller groups in the order specified by the  OVER clause. For example if the total number of rows is 53 and the number of  buckets is five, the first three buckets will have 11 rows and the two remaining  buckets will have 10 rows each. If on the other hand the total number of rows is  divisible by the number of buckets, the rows will be distributed evenly among  the buckets. For example, if the total number of rows is 50, and there are five  buckets, each bucket will contain 10 rows.</em></span></p>
<p><span style="color:#993366;"><strong><span style="color:#000000;">Oracle</span></strong><span style="color:#000000;">:</span></span></p>
<p><span style="color:#993366;"><span style="color:#000000;">And the same function is available in Oracle as well<em>. </em><span style="color:#000000;">And the same code shown above will work in Oracle as well.  Just replace SYS.OBJECTS with ALL_OBJECTS.</span></span></span></p>
<p><span style="color:#993366;"><span style="color:#000000;"><span style="color:#000000;">Pretty simple way of splitting a large data set into non-overlapping sets, isn&#8217;t it!</span></span></span></p>
<p><span style="color:#993366;"><span style="color:#000000;"><span style="color:#000000;"><strong>Resources</strong>:</span></span></span></p>
<ul>
<li><span style="color:#993366;"><span style="color:#000000;"><span style="color:#000000;">SQL Server MSDN BOL entry for the NTILE() function &#8211; <a href="http://msdn.microsoft.com/en-us/library/ms175126.aspx">here</a>.</span></span></span></li>
<li><span style="color:#993366;"><span style="color:#000000;"><span style="color:#000000;">Oracle documentation of the NTILE() function &#8211; <a href="http://stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/functions091.htm">here</a>.<br />
</span></span></span></li>
</ul>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decipherinfosys.wordpress.com/2409/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decipherinfosys.wordpress.com/2409/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decipherinfosys.wordpress.com/2409/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decipherinfosys.wordpress.com/2409/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decipherinfosys.wordpress.com/2409/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decipherinfosys.wordpress.com/2409/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decipherinfosys.wordpress.com/2409/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decipherinfosys.wordpress.com/2409/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decipherinfosys.wordpress.com/2409/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decipherinfosys.wordpress.com/2409/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2409&subd=decipherinfosys&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://decipherinfosys.wordpress.com/2009/10/16/splitting-a-number-of-rows-into-equal-groups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0409e90c82255ecb867b436a97e4f779?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">decipherinfosys</media:title>
		</media:content>
	</item>
		<item>
		<title>SSRS and Excel rendering limitations</title>
		<link>http://decipherinfosys.wordpress.com/2009/10/13/ssrs-and-excel-rendering-limitations/</link>
		<comments>http://decipherinfosys.wordpress.com/2009/10/13/ssrs-and-excel-rendering-limitations/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 15:24:48 +0000</pubDate>
		<dc:creator>decipherinfosys</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://decipherinfosys.wordpress.com/?p=2401</guid>
		<description><![CDATA[Ran into an issue at a client site today in which one of the columns of the report was getting a concatenated string of the DC&#8217;s for the suppliers.  It turns out that for one of them, the string was over the limit that excel could handle and as a result when the end user [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2401&subd=decipherinfosys&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Ran into an issue at a client site today in which one of the columns of the report was getting a concatenated string of the DC&#8217;s for the suppliers.  It turns out that for one of them, the string was over the limit that excel could handle and as a result when the end user was trying to export out the data to excel, it failed.  Here is what the error was:</p>
<p><img class="aligncenter size-full wp-image-2402" title="SSRS_ERR_1" src="http://decipherinfosys.files.wordpress.com/2009/10/ssrs_err_1.jpg?w=641&#038;h=107" alt="SSRS_ERR_1" width="641" height="107" /></p>
<p>And when you clicked on Yes, you would get this:</p>
<p><img class="aligncenter size-full wp-image-2403" title="SSRS_ERR_2" src="http://decipherinfosys.files.wordpress.com/2009/10/ssrs_err_2.jpg?w=506&#038;h=243" alt="SSRS_ERR_2" width="506" height="243" /></p>
<p>Needless to say, both are cryptic messages &#8211; after looking up on technet and MSDN and googling/binging <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  it for a while, came across the limitations of excel rendering which we thought that we would post here so that the readers can benefit from it as well.  The limitations are mentioned here:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms156418(SQL.90).aspx">http://msdn.microsoft.com/en-us/library/ms156418(SQL.90).aspx</a></p>
<p>The report design was changed as well since there was no need to have that concatenated list in this case but it is good to be aware of the limitations so that you know the next time what might be a possible cause for that weird error that excel throws at you.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decipherinfosys.wordpress.com/2401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decipherinfosys.wordpress.com/2401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decipherinfosys.wordpress.com/2401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decipherinfosys.wordpress.com/2401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decipherinfosys.wordpress.com/2401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decipherinfosys.wordpress.com/2401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decipherinfosys.wordpress.com/2401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decipherinfosys.wordpress.com/2401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decipherinfosys.wordpress.com/2401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decipherinfosys.wordpress.com/2401/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2401&subd=decipherinfosys&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://decipherinfosys.wordpress.com/2009/10/13/ssrs-and-excel-rendering-limitations/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0409e90c82255ecb867b436a97e4f779?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">decipherinfosys</media:title>
		</media:content>

		<media:content url="http://decipherinfosys.files.wordpress.com/2009/10/ssrs_err_1.jpg" medium="image">
			<media:title type="html">SSRS_ERR_1</media:title>
		</media:content>

		<media:content url="http://decipherinfosys.files.wordpress.com/2009/10/ssrs_err_2.jpg" medium="image">
			<media:title type="html">SSRS_ERR_2</media:title>
		</media:content>
	</item>
		<item>
		<title>SSIS &#8211; Data Flow Transformations</title>
		<link>http://decipherinfosys.wordpress.com/2009/10/13/ssis-data-flow-transformations/</link>
		<comments>http://decipherinfosys.wordpress.com/2009/10/13/ssis-data-flow-transformations/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 15:12:04 +0000</pubDate>
		<dc:creator>decipherinfosys</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://decipherinfosys.wordpress.com/?p=2391</guid>
		<description><![CDATA[We have written before about different aspects of SQL Server Integration Services &#8211; you can read more on those blog posts here.   Until our previous articles we have been looking at mainly the Control Flow Tasks in the Sql Server Integration Services. Control Flow Tasks maintain the Flow of the logic in the SSIS. The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2391&subd=decipherinfosys&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We have written before about different aspects of SQL Server Integration Services &#8211; you can read more on those blog posts <a href="http://decipherinfosys.wordpress.com/?s=%22Integration+Services%22">here</a>.   Until our previous articles we have been looking at mainly the Control Flow Tasks in the Sql Server Integration Services. Control Flow Tasks maintain the Flow of the logic in the SSIS. The main transformation logic in performed by the data flow task. One of the main uses of the Sql Server Integration Services (SSIS) is to perform the Extraction, Transformation, Data Cleansing and Loading (ETL or sometimes called as ETLM) of the data from various sources. As data from various sources might come in a different format, there is generally a requirement of cleaning up of the data before we load the data into our system. Data cleansing or rather transformation in Sql Server Integration Services (SSIS) is done using the Data Transformation Tasks. Today, in our post, we are going to look at a few of such SSIS Data Transformation Tasks.</p>
<p>One of the data flow transformations which is used for the data cleansing purposes is called the  Lookup Transform. We are going to explore the Lookup Transform in Sql Server 2005. There have been some enhancements in SQL Server 2008 which we are going to look into in future posts. The look up transform is very similar to that of the lookup tab in the data pump task in SQL Server 2000 DTS. This task is used to derive new columns based on the existing set of columns. This transform performs look up on an existing table based on the columns which are existing in the dataflow (incoming source). Let us explore more into this transform with the help of an example.</p>
<p>We will pick up a business use case scenario which is very common and we have faced it as well in our projects.  Let us consider a business scenario where we are getting an inbound file from a client and the file contains the health application records created on that particular day. Furthermore the file contains the City and the State Code but not the zip code. Our task is to look up the zip code by using the City and State Code Columns and populate our destination table. If the look up fails, then, we need to insert a -1 in the destination table.</p>
<p>For that we should have an already existing table in the database which stores the state code, city and the zip code. The following code block creates the table and populates it with the required data.<br />
<code><br />
IF EXISTS(SELECT 1 FROM SYS.TABLES WHERE NAME ='lkpZipCode')<br />
DROP TABLE lkpZipCode<br />
GO<br />
CREATE TABLE lkpZipCode<br />
(<br />
ZipCodeID INT IDENTITY(1,1) PRIMARY KEY<br />
, CityCode VARCHAR(20)<br />
, StateCode CHAR(2)<br />
, ZipCode VARCHAR(20)<br />
)</code></p>
<p>/*Using SQL Server 2008 functionality to do the inserts in one single statement*/</p>
<p>INSERT INTO lkpZipCode (CityCode, StateCode, ZipCode)<br />
VALUES (&#8216;Bellevue&#8217;,'WA&#8217;,98007),<br />
(&#8216;Seattle&#8217;,'WA&#8217;,98004),<br />
(&#8216;Atlanta&#8217;,'GA&#8217;,30339),<br />
(&#8216;Alpharetta&#8217;,'GA&#8217;,30005),<br />
(&#8216;Irvington&#8217;,'AL&#8217;,36544),<br />
(&#8216;Jacksonville&#8217;,'FL&#8217;,36265),<br />
(&#8216;Austin&#8217;,'TX&#8217;,73301),<br />
(&#8216;Houston&#8217;,'TX&#8217;,77001)<br />
GO</p>
<p>Let us now create a table to hold the incoming values. The following piece of code creates the destination table.<br />
<code><br />
IF EXISTS(SELECT 1 FROM SYS.TABLES WHERE NAME ='Customers')<br />
DROP TABLE Customers<br />
GO</code></p>
<p>CREATE TABLE dbo.Customers<br />
(<br />
CustomerID     INT IDENTITY(1,1) PRIMARY KEY<br />
, CustomerFirstName Varchar(20) NOT NULL<br />
, CustomerLastName  Varchar(20) NOT NULL<br />
, City        Varchar(20)   NOT NULL<br />
, [State]        Varchar(2)   NOT NULL<br />
, ZipCode        Varchar(20)          NOT NULL<br />
)</p>
<p>Create a text file (Customers.txt) and populate it with some sample data.</p>
<p>Open up the Business Intelligence Development Studio (BIDS) and create a new SSIS project.   If you are new to SSIS, we would recommended to read our previous articles about creating and running the SSIS Packages using BIDS.</p>
<p><strong>Package Creation</strong>:</p>
<p>Since we are dealing with the flow of data in this scenario, we should use the data flow tasks to transform the data according to our needs.  Drag and drop the Data Flow task from the Control Flow task onto the Control Flow Pane of the BIDS.   Double click on the Data Flow Task which takes us to the data flow pane.   Since our source is a text file, drag and drop the Flat File Source from the data flow task on to the data flow pane.   Configure the Flat File Source to use the flat file we created earlier.</p>
<p><strong>Configuration of the Lookup Transform</strong>:</p>
<p>Since we have to derive the zip code based on the State and City columns in the text file, by looking up the zip code in our look up table, we have to use the look up transform.   Drag and drop the lookup transform from the Data Flow Task on to the Data Flow pane.   Double click on the Transform to edit it.   The following image shows the Reference Table Tab of the Transform:</p>
<p><img class="aligncenter size-full wp-image-2392" title="SSIS_DFT_1" src="http://decipherinfosys.files.wordpress.com/2009/10/ssis_dft_1.jpg?w=582&#038;h=686" alt="SSIS_DFT_1" width="582" height="686" /></p>
<p>This shows the reference table tab of the lookup transform.   In this tab, we can configure the table which we will use to look up our zip code based on the City and the State columns from the incoming file.   Click on the NEW button beside the OLEDB Connection Manager to create a connection to the database in which our table is located. Provide the server name and the database name in the relevant fields and click OK.   The image below shows the creation of the connection to the database:</p>
<p><img class="aligncenter size-full wp-image-2393" title="SSIS_DFT_2" src="http://decipherinfosys.files.wordpress.com/2009/10/ssis_dft_2.jpg?w=517&#038;h=543" alt="SSIS_DFT_2" width="517" height="543" /></p>
<p>We can either specify a table or a sql query to generate the result set against which we will do a lookup using the City and State columns from the incoming file.   In our case we are using the table to do a look up.   If needed, we can specify a sql query by clicking on the radio button against the ‘Use Results of an Sql Query’ and specify the sql query.   For our scenario, drop down the ‘Use Table or View’ and select the table lkpZipCode.   The image shown below depicts the same:</p>
<p><img class="aligncenter size-full wp-image-2394" title="SSIS_DFT_3" src="http://decipherinfosys.files.wordpress.com/2009/10/ssis_dft_3.jpg?w=580&#038;h=695" alt="SSIS_DFT_3" width="580" height="695" /></p>
<p>In the columns tab, we configure the columns on which we do a look up on the source columns and the destination columns.   The image below shows the configuration of columns tab in the Lookup Table:</p>
<p><img class="aligncenter size-full wp-image-2395" title="SSIS_DFT_4" src="http://decipherinfosys.files.wordpress.com/2009/10/ssis_dft_4.jpg?w=580&#038;h=639" alt="SSIS_DFT_4" width="580" height="639" /></p>
<p>Drag the City column from the Source Available columns and drop it on the CityCode column of the destination.   Repeat the same with the State column in the source and the StateCode in the destination.   Since we are looking up the ZipCode column in the lookup table, mention the same in the Lookup Column of the editor.   Since this is a new column added to the data flow, select the ‘Add as new column’ in the lookup operation drop down.   Give the output alias as ZipCode.   This finishes the configuration of the Lookup Transformation.</p>
<p><strong>Lookup Transform Outputs</strong></p>
<p>The lookup Transform has two outputs:  Lookup Match output and the Error Output.   If the Lookup is successful then those rows are sent out to the Lookup Match output.  If the lookup fails to find any records, then those rows are sent to the Error Output.</p>
<p><strong>Derived Column Transform</strong>:</p>
<p>As per our business scenario, if the lookup fails, then we have to insert a -1 into the look up table.   For that we have to make use of the Derived Column Transform.   A Derived Column Transform derives a new column and adds it to the data flow based on either the existing columns in the data flow or based on the expressions.   Drag and drop the Derived Column Transform on to the data flow from the data flow task and double click on it to edit the properties.   The image below shows the Transformation editor:</p>
<p><img class="aligncenter size-full wp-image-2396" title="SSIS_DFT_5" src="http://decipherinfosys.files.wordpress.com/2009/10/ssis_dft_5.jpg?w=680&#038;h=639" alt="SSIS_DFT_5" width="680" height="639" /></p>
<p>In the derived column name provide the name of the column we intend to derive. In this case, since we are intending to insert a -1 zip code if the look up fails, type the name of the derived column as ZipCode and the Expression as -1.   In the derived column, select the ‘add as new column’ since we are adding a new column to the dataflow.  Drag the error output (red) arrow and join the Derived column Transform.   This opens up the editor as shown below:</p>
<p><img class="aligncenter size-full wp-image-2397" title="SSIS_DFT_6" src="http://decipherinfosys.files.wordpress.com/2009/10/ssis_dft_6.jpg?w=600&#038;h=558" alt="SSIS_DFT_6" width="600" height="558" /></p>
<p>Even if the lookup fails, since we should not error the rows out, select the Redirect Row option in the Error column of the Lookup Output as shown in the image above and click OK.   This will redirect the rows on which the lookup failed to the Derived Column Transform, which adds the column ZipCode with a value of -1 to the data flow for the failed lookup records.</p>
<p><strong>UNION ALL Transform</strong></p>
<p>Since we have to combine the result set of both the successful lookups and un-successful lookup, we will use the UNION ALL Transform.   Drag and drop the union all transform from the data flow task on the data flow.   Drag the green arrow (look up match) arrow from the lookup transform and connect it to one of the input of the union all transform.</p>
<p><strong>OLEDB Destination</strong></p>
<p>As a final step, we have to load the cleansed records into our destination table.   To do that drag and drop the OLEDB Destination from the Data Flow tasks on to the data flow.   Configure the data flow to insert the data set from the UNION ALL transform into the destination table.   This transform has been dealt in detail in our previous posts. The image below shows the screen shot of the entire SSIS package:</p>
<p><img class="aligncenter size-full wp-image-2398" title="SSIS_DFT_7" src="http://decipherinfosys.files.wordpress.com/2009/10/ssis_dft_7.jpg?w=830&#038;h=580" alt="SSIS_DFT_7" width="830" height="580" /></p>
<p>To summarize, in this blog post, we discussed the use of SSIS to cleanse/transform the data from various sources.  We understood the importance of the lookup transform and dealt with the configuration of the lookup transform in detail.   We also explored other transforms like Derived Column Transforms and UNION ALL transform which are also very handy transforms in the data flow.   In some of the upcoming posts, we will look at some of the enhancements in SQL Server 2008 and will also cover other business use case scenarios.</p>
<p><strong>Resources</strong>:</p>
<ul>
<li>Lookup Transform &#8211; MSDN article &#8211; <a href="http://technet.microsoft.com/en-us/library/ms141821.aspx">here</a>.</li>
<li>MVP Stacia Misner&#8217;s post on Lookup Transform and Caching &#8211; <a href="http://www.sqlskills.com/BLOGS/STACIA/post/SQL-Server-2008-Lookup-Transformation-and-Caching.aspx">here</a>.</li>
<li>MVP Jorg Klein&#8217;s post on the case sensitive nature of the lookup transform &#8211; <a href="http://sqlblogcasts.com/blogs/jorg/archive/2008/02/12/SSIS-_1320_-Lookup-Transformation-is-case-sensitive.aspx">here</a>.</li>
<li>Arshad&#8217;s article on sqlserverperformance.com &#8211; it discusses the SSIS enhancements in SQL Server 2008 and has a series of posts on the topic &#8211; <a href="http://www.sql-server-performance.com/articles/Arshad_Ali.aspx">here</a>.</li>
<li>Brian Knight&#8217;s books on SSIS &#8211; these are the best resource for anyone new or experienced in SSIS.  There are other authors as well &#8211; too many books &amp; authors to list here &#8211; you can see all of them from this link at amazon &#8211; <a href="http://www.amazon.com/s/ref=nb_ss?url=search-alias%3Daps&amp;field-keywords=SSIS+Brian+Knight&amp;x=0&amp;y=0">here</a>.</li>
</ul>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decipherinfosys.wordpress.com/2391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decipherinfosys.wordpress.com/2391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decipherinfosys.wordpress.com/2391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decipherinfosys.wordpress.com/2391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decipherinfosys.wordpress.com/2391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decipherinfosys.wordpress.com/2391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decipherinfosys.wordpress.com/2391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decipherinfosys.wordpress.com/2391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decipherinfosys.wordpress.com/2391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decipherinfosys.wordpress.com/2391/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=decipherinfosys.wordpress.com&blog=691282&post=2391&subd=decipherinfosys&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://decipherinfosys.wordpress.com/2009/10/13/ssis-data-flow-transformations/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0409e90c82255ecb867b436a97e4f779?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">decipherinfosys</media:title>
		</media:content>

		<media:content url="http://decipherinfosys.files.wordpress.com/2009/10/ssis_dft_1.jpg" medium="image">
			<media:title type="html">SSIS_DFT_1</media:title>
		</media:content>

		<media:content url="http://decipherinfosys.files.wordpress.com/2009/10/ssis_dft_2.jpg" medium="image">
			<media:title type="html">SSIS_DFT_2</media:title>
		</media:content>

		<media:content url="http://decipherinfosys.files.wordpress.com/2009/10/ssis_dft_3.jpg" medium="image">
			<media:title type="html">SSIS_DFT_3</media:title>
		</media:content>

		<media:content url="http://decipherinfosys.files.wordpress.com/2009/10/ssis_dft_4.jpg" medium="image">
			<media:title type="html">SSIS_DFT_4</media:title>
		</media:content>

		<media:content url="http://decipherinfosys.files.wordpress.com/2009/10/ssis_dft_5.jpg" medium="image">
			<media:title type="html">SSIS_DFT_5</media:title>
		</media:content>

		<media:content url="http://decipherinfosys.files.wordpress.com/2009/10/ssis_dft_6.jpg" medium="image">
			<media:title type="html">SSIS_DFT_6</media:title>
		</media:content>

		<media:content url="http://decipherinfosys.files.wordpress.com/2009/10/ssis_dft_7.jpg" medium="image">
			<media:title type="html">SSIS_DFT_7</media:title>
		</media:content>
	</item>
	</channel>
</rss>