<?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>ShinyLight Development &#187; SQL Server</title>
	<atom:link href="http://www.shinylight.com/category/databases/sql-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shinylight.com</link>
	<description>Web Development and Other Goodness in the World of a Software Engineer.</description>
	<lastBuildDate>Mon, 07 Jun 2010 03:02:19 +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>Linked Server via MS Jet 4.0 Provider</title>
		<link>http://www.shinylight.com/2010/06/07/linked-server-via-ms-jet-4-0-provider/</link>
		<comments>http://www.shinylight.com/2010/06/07/linked-server-via-ms-jet-4-0-provider/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 03:00:28 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=982</guid>
		<description><![CDATA[Here&#8217;s another way to created a linked server using another provider, Microsoft Jet 4.0 OLE DB Provider. This is for SQL Server 2008. Check out my previous Linked Server tutorial if needed for SQL Server 2005.

For this setup, let&#8217;s use the login&#8217;s current security context. Make sure that you whatever SSMS you use to connect [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s another way to created a linked server using another provider, Microsoft Jet 4.0 OLE DB Provider. This is for SQL Server 2008. Check out my previous <a href="http://www.shinylight.com/2009/09/19/linked-servers/" target="_blank">Linked Server</a> tutorial if needed for SQL Server 2005.</p>
<p><img class="alignnone size-full wp-image-983" title="1" src="http://www.shinylight.com/wp-content/uploads/2010/06/1.png" alt="" width="495" height="448" /></p>
<p>For this setup, let&#8217;s use the login&#8217;s current security context. Make sure that you whatever SSMS you use to connect to the server uses the same user credentials as user that created the linked server.</p>
<p><img class="alignnone size-full wp-image-986" title="2" src="http://www.shinylight.com/wp-content/uploads/2010/06/2.png" alt="" width="488" height="430" /></p>
<p>So if I create that on a server, then I&#8217;ll have query it using the same credentials just used. If you want to know how to query it, check out my <a href="../2009/09/19/linked-servers/" target="_blank">Previous Tutorial</a>.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/06/07/linked-server-via-ms-jet-4-0-provider/&amp;submitHeadline=Linked+Server+via+MS+Jet+4.0+Provider&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/06/07/linked-server-via-ms-jet-4-0-provider/&amp;title=Linked+Server+via+MS+Jet+4.0+Provider" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/06/07/linked-server-via-ms-jet-4-0-provider/&amp;title=Linked+Server+via+MS+Jet+4.0+Provider" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/06/07/linked-server-via-ms-jet-4-0-provider/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/06/07/linked-server-via-ms-jet-4-0-provider/&amp;title=Linked+Server+via+MS+Jet+4.0+Provider" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/06/07/linked-server-via-ms-jet-4-0-provider/&amp;bm_description=Linked+Server+via+MS+Jet+4.0+Provider" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/06/07/linked-server-via-ms-jet-4-0-provider/&amp;T=Linked+Server+via+MS+Jet+4.0+Provider" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/06/07/linked-server-via-ms-jet-4-0-provider/&amp;title=Linked+Server+via+MS+Jet+4.0+Provider" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/06/07/linked-server-via-ms-jet-4-0-provider/&amp;title=Linked+Server+via+MS+Jet+4.0+Provider" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/06/07/linked-server-via-ms-jet-4-0-provider/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/06/07/linked-server-via-ms-jet-4-0-provider/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Linked+Server+via+MS+Jet+4.0+Provider+@+http://www.shinylight.com/2010/06/07/linked-server-via-ms-jet-4-0-provider/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/06/07/linked-server-via-ms-jet-4-0-provider/&amp;t=Linked+Server+via+MS+Jet+4.0+Provider" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/06/07/linked-server-via-ms-jet-4-0-provider/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing Database Import Scripts with Snapshots</title>
		<link>http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/</link>
		<comments>http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/#comments</comments>
		<pubDate>Tue, 04 May 2010 23:39:32 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Automation / Scripting]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Systems]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=962</guid>
		<description><![CDATA[Can&#8217;t stress enough how handy database snapshots (compatible only in Enterprise and Developer editions of SQL Server 2005+) come in when testing bulk imports, data scrubbing, or any sort of data / schema modification script. In nearly no time, I can create a snapshot (via shortcut snippet), run my script &#8211; don&#8217;t like the results? [...]]]></description>
			<content:encoded><![CDATA[<p>Can&#8217;t stress enough how handy database snapshots (compatible only in Enterprise and Developer editions of SQL Server 2005+) come in when testing bulk imports, data scrubbing, or any sort of data / schema modification script. In nearly no time, I can create a snapshot (via shortcut snippet), run my script &#8211; don&#8217;t like the results? My script crapped out the data? I can run an instant undo by recovering from the snapshot, which works pretty fast. If I want to create another snapshot, I usually tend to overwrite the snapshot I created, and then create it again.</p>
<p>It&#8217;s so handy that I have a snippet for it:<br />
<img src="http://www.shinylight.com/wp-content/uploads/2010/05/snippet.png"  /></p>
<p>Anywhoot, here&#8217;s how you create a snapshot:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">-- CREATING A SNAPSHOT</span>
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">DATABASE</span> YourDatabase_snap <span style="color: #0000FF;">ON</span>         <span style="color: #008080;">-- Name of new snapshot</span>
<span style="color: #808080;">&#40;</span>
  NAME <span style="color: #808080;">=</span> yourdb_data,                        <span style="color: #008080;">-- Logical filename of source db you want to snapshot</span>
  FILENAME <span style="color: #808080;">=</span> <span style="color: #FF0000;">'c:<span style="color: #000099; font-weight: bold;">\Y</span>ourDatabase_data_1800.ss'</span>  <span style="color: #008080;">-- Sparse file to create</span>
<span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">AS</span> SNAPSHOT <span style="color: #0000FF;">OF</span> YourDatabase;                 <span style="color: #008080;">-- Source db name</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">-- RECOVERING FROM A SNAPSHOT</span>
<span style="color: #0000FF;">USE</span> master;
<span style="color: #0000FF;">RESTORE</span> <span style="color: #0000FF;">DATABASE</span> YourDatabase                    <span style="color: #008080;">-- Source db name where the data resided</span>
<span style="color: #0000FF;">FROM</span> DATABASE_SNAPSHOT <span style="color: #808080;">=</span> <span style="color: #FF0000;">'YourDatabase_snap'</span>;    <span style="color: #008080;">-- Snapshot db name</span></pre></td></tr></table></div>

<p>Deleting a snapshot is just like dropping a database.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">DROP</span> <span style="color: #0000FF;">DATABASE</span> YourDatabase_Snap</pre></td></tr></table></div>

<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;submitHeadline=Testing+Database+Import+Scripts+with+Snapshots&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;title=Testing+Database+Import+Scripts+with+Snapshots" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;title=Testing+Database+Import+Scripts+with+Snapshots" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;title=Testing+Database+Import+Scripts+with+Snapshots" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;bm_description=Testing+Database+Import+Scripts+with+Snapshots" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;T=Testing+Database+Import+Scripts+with+Snapshots" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;title=Testing+Database+Import+Scripts+with+Snapshots" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;title=Testing+Database+Import+Scripts+with+Snapshots" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Testing+Database+Import+Scripts+with+Snapshots+@+http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;t=Testing+Database+Import+Scripts+with+Snapshots" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TSQL Functions Inspired By ColdFusion&#8217;s Lists Functions</title>
		<link>http://www.shinylight.com/2010/04/27/tsql-functions-inspired-by-coldfusions-lists-functions/</link>
		<comments>http://www.shinylight.com/2010/04/27/tsql-functions-inspired-by-coldfusions-lists-functions/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 00:08:43 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=944</guid>
		<description><![CDATA[In my last project, there was a bit of data scrubbing on the database side (SQL Server 2008) that I decided to create a few UDF&#8217;s that function similar to ColdFusion&#8217;s Lists function. The one that varies a little bit is ListLen(), since I needed to take into account empty tokens. The ChopIf() was inspired [...]]]></description>
			<content:encoded><![CDATA[<p>In my last project, there was a bit of data scrubbing on the database side (SQL Server 2008) that I decided to create a few UDF&#8217;s that function similar to ColdFusion&#8217;s Lists function. The one that varies a little bit is ListLen(), since I needed to take into account empty tokens. The ChopIf() was inspired by Perl&#8217;s chop() function. These UDFs should be SQL Server 2005-compatible. </p>
<p>I should say though, that some of these functions depend on each other. ListLen(), GetToken(), and ChopIf() are independent.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
</pre></td><td class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">------------------------------------------------------------------</span>
<span style="color: #008080;">-- Functions similarly like ColdFusion ListSort() function,</span>
<span style="color: #008080;">-- except it currently only sorts strings. </span>
<span style="color: #008080;">--</span>
<span style="color: #008080;">-- Example 1:</span>
<span style="color: #008080;">--    dbo.ListSort( 'dan is so mega awesome that he rules all the time', 'ASC', ' ' )</span>
<span style="color: #008080;">--</span>
<span style="color: #008080;">-- Returns: </span>
<span style="color: #008080;">--    all awesome dan he is mega rules so that the time</span>
<span style="color: #008080;">--</span>
<span style="color: #008080;">-- Example 2:</span>
<span style="color: #008080;">--    dbo.ListSort( 'dan is so mega awesome that he rules all the time', 'DESC', ' ' )</span>
<span style="color: #008080;">--</span>
<span style="color: #008080;">-- Returns: </span>
<span style="color: #008080;">--    time the that so rules mega is he dan awesome all</span>
<span style="color: #008080;">------------------------------------------------------------------</span>
&nbsp;
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">FUNCTION</span> <span style="color: #808080;">&#91;</span>dbo<span style="color: #808080;">&#93;</span>.<span style="color: #808080;">&#91;</span>ListSort<span style="color: #808080;">&#93;</span>
<span style="color: #808080;">&#40;</span>
  @string    <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span>,  
  @sort_type <span style="color: #0000FF;">CHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">3</span><span style="color: #808080;">&#41;</span>       <span style="color: #808080;">=</span> <span style="color: #FF0000;">'ASC'</span>,
  @delimiter <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">=</span> <span style="color: #FF0000;">','</span>
<span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">RETURNS</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">500</span><span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">AS</span>
&nbsp;
<span style="color: #0000FF;">BEGIN</span>
&nbsp;
  <span style="color: #0000FF;">DECLARE</span> @position <span style="color: #0000FF;">AS</span> <span style="color: #0000FF;">INT</span>
  <span style="color: #0000FF;">DECLARE</span> @token <span style="color: #0000FF;">AS</span> <span style="color: #0000FF;">VARCHAR</span> <span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span>
  <span style="color: #0000FF;">DECLARE</span> @counter   <span style="color: #0000FF;">AS</span> <span style="color: #0000FF;">INT</span>
  <span style="color: #0000FF;">DECLARE</span> @sortedList <span style="color: #0000FF;">AS</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">500</span><span style="color: #808080;">&#41;</span>
&nbsp;
  <span style="color: #0000FF;">DECLARE</span> @sortTempTable <span style="color: #0000FF;">TABLE</span> <span style="color: #808080;">&#40;</span> token <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">500</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">&#41;</span>
  <span style="color: #0000FF;">DECLARE</span> @sortedTable   <span style="color: #0000FF;">TABLE</span> <span style="color: #808080;">&#40;</span> token <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">500</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">&#41;</span>  
&nbsp;
  <span style="color: #0000FF;">SELECT</span> @string   <span style="color: #808080;">=</span> @string <span style="color: #808080;">+</span> @delimiter,
         @counter  <span style="color: #808080;">=</span> <span style="color: #000;">1</span>,
         @position <span style="color: #808080;">=</span> <span style="color: #000;">0</span>,
         @token    <span style="color: #808080;">=</span> <span style="color: #FF0000;">''</span>
&nbsp;
  <span style="color: #0000FF;">WHILE</span> <span style="color: #808080;">&#40;</span> <span style="color: #FF00FF;">PATINDEX</span><span style="color: #808080;">&#40;</span> <span style="color: #FF0000;">'%'</span> <span style="color: #808080;">+</span> @delimiter <span style="color: #808080;">+</span> <span style="color: #FF0000;">'%'</span> , @string <span style="color: #808080;">&#41;</span> <span style="color: #808080;">&lt;&gt;</span> <span style="color: #000;">0</span> <span style="color: #808080;">&#41;</span> 
  <span style="color: #0000FF;">BEGIN</span>
    <span style="color: #0000FF;">SELECT</span> @position <span style="color: #808080;">=</span> <span style="color: #FF00FF;">PATINDEX</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'%'</span> <span style="color: #808080;">+</span> @delimiter <span style="color: #808080;">+</span> <span style="color: #FF0000;">'%'</span> , @string <span style="color: #808080;">&#41;</span>,
           @token    <span style="color: #808080;">=</span> <span style="color: #0000FF;">LEFT</span><span style="color: #808080;">&#40;</span> @string, @position <span style="color: #808080;">-</span> <span style="color: #000;">1</span> <span style="color: #808080;">&#41;</span>,
           @string   <span style="color: #808080;">=</span> <span style="color: #FF00FF;">STUFF</span><span style="color: #808080;">&#40;</span> @string, <span style="color: #000;">1</span>, @position, <span style="color: #808080;">NULL</span> <span style="color: #808080;">&#41;</span>,
           @counter  <span style="color: #808080;">=</span> @counter <span style="color: #808080;">+</span> <span style="color: #000;">1</span>
&nbsp;
    <span style="color: #0000FF;">INSERT</span> @sortTempTable<span style="color: #808080;">&#40;</span> token <span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">VALUES</span><span style="color: #808080;">&#40;</span> @token <span style="color: #808080;">&#41;</span>     
  <span style="color: #0000FF;">END</span>
&nbsp;
  <span style="color: #0000FF;">SET</span> @sortedList <span style="color: #808080;">=</span> <span style="color: #FF0000;">''</span>
&nbsp;
  <span style="color: #008080;">-- Let's sort the table and put it into @sortedTable</span>
  <span style="color: #008080;">-- Because of nature of Rank(), we can't set @sortedList in this statement.</span>
  <span style="color: #008080;">-- Have to separate it into another select clause.</span>
  <span style="color: #0000FF;">INSERT</span> <span style="color: #0000FF;">INTO</span> @sortedTable
    <span style="color: #0000FF;">SELECT</span> <span style="color: #FF00FF;">LTRIM</span><span style="color: #808080;">&#40;</span> token <span style="color: #808080;">&#41;</span>
    <span style="color: #0000FF;">FROM</span>   @sortTempTable
    <span style="color: #0000FF;">ORDER</span>  <span style="color: #0000FF;">BY</span> <span style="color: #0000FF;">CASE</span> <span style="color: #0000FF;">WHEN</span> @sort_type <span style="color: #808080;">=</span> <span style="color: #FF0000;">'ASC'</span>  <span style="color: #0000FF;">THEN</span> <span style="color: #808080;">&#40;</span> RANK<span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">OVER</span> <span style="color: #808080;">&#40;</span> <span style="color: #0000FF;">ORDER</span> <span style="color: #0000FF;">BY</span> <span style="color: #FF00FF;">LTRIM</span><span style="color: #808080;">&#40;</span>token<span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">ASC</span> <span style="color: #808080;">&#41;</span> <span style="color: #808080;">&#41;</span>
                   <span style="color: #0000FF;">WHEN</span> @sort_type <span style="color: #808080;">=</span> <span style="color: #FF0000;">'DESC'</span> <span style="color: #0000FF;">THEN</span> <span style="color: #808080;">&#40;</span> RANK<span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">OVER</span> <span style="color: #808080;">&#40;</span> <span style="color: #0000FF;">ORDER</span> <span style="color: #0000FF;">BY</span> <span style="color: #FF00FF;">LTRIM</span><span style="color: #808080;">&#40;</span>token<span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">DESC</span> <span style="color: #808080;">&#41;</span> <span style="color: #808080;">&#41;</span>
              <span style="color: #0000FF;">END</span>  
&nbsp;
  <span style="color: #0000FF;">SELECT</span> @sortedList <span style="color: #808080;">=</span> @sortedList <span style="color: #808080;">+</span> token <span style="color: #808080;">+</span> @delimiter
  <span style="color: #0000FF;">FROM</span>   @sortedTable
&nbsp;
  <span style="color: #0000FF;">RETURN</span> dbo.<span style="color: #202020;">ChopIf</span><span style="color: #808080;">&#40;</span> @sortedList, @delimiter <span style="color: #808080;">&#41;</span>
&nbsp;
<span style="color: #0000FF;">END</span>
GO</pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
</pre></td><td class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">------------------------------------------------------------------</span>
<span style="color: #008080;">-- Functions sort of like ColdFusion's ListLen() method, but it</span>
<span style="color: #008080;">-- takes into account empty tokens. </span>
<span style="color: #008080;">--</span>
<span style="color: #008080;">-- Example 1:</span>
<span style="color: #008080;">--    dbo.ListLen( 'Dan is cool', ' ' )</span>
<span style="color: #008080;">--</span>
<span style="color: #008080;">-- Returns: </span>
<span style="color: #008080;">--    3</span>
<span style="color: #008080;">-- </span>
<span style="color: #008080;">-- Example 2:</span>
<span style="color: #008080;">--    dbo.ListLen( 'dan,,very,,,,awesome,', ',' )</span>
<span style="color: #008080;">--</span>
<span style="color: #008080;">-- Returns: </span>
<span style="color: #008080;">--    8</span>
<span style="color: #008080;">------------------------------------------------------------------</span>
&nbsp;
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">FUNCTION</span> <span style="color: #808080;">&#91;</span>dbo<span style="color: #808080;">&#93;</span>.<span style="color: #808080;">&#91;</span>ListLen<span style="color: #808080;">&#93;</span>
<span style="color: #808080;">&#40;</span>
  @string <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span>,
  @delimiter <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">=</span> <span style="color: #FF0000;">','</span>
<span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">RETURNS</span> <span style="color: #0000FF;">INT</span>
<span style="color: #0000FF;">AS</span>
<span style="color: #0000FF;">BEGIN</span>
&nbsp;
  <span style="color: #0000FF;">DECLARE</span> @loopCount <span style="color: #0000FF;">INT</span>, 
          @tokenCount <span style="color: #0000FF;">INT</span>
&nbsp;
  <span style="color: #0000FF;">SELECT</span> @loopCount <span style="color: #808080;">=</span> <span style="color: #000;">0</span>, 
         @tokenCount <span style="color: #808080;">=</span> <span style="color: #000;">0</span>
&nbsp;
  <span style="color: #008080;">-- If it's an empty string, the list length is 0</span>
  <span style="color: #0000FF;">IF</span> DATALENGTH<span style="color: #808080;">&#40;</span> @string <span style="color: #808080;">&#41;</span> <span style="color: #808080;">=</span> <span style="color: #000;">0</span>
    <span style="color: #0000FF;">BEGIN</span>
      <span style="color: #0000FF;">SET</span> @tokenCount <span style="color: #808080;">=</span> <span style="color: #000;">0</span>
    <span style="color: #0000FF;">END</span>
  <span style="color: #0000FF;">ELSE</span>
    <span style="color: #0000FF;">BEGIN</span>
      <span style="color: #008080;">-- Count tokens, including empty ones like dan,,very,,,,awesome,</span>
      <span style="color: #0000FF;">SET</span> @tokenCount <span style="color: #808080;">=</span> @tokenCount <span style="color: #808080;">+</span> <span style="color: #000;">1</span>
      <span style="color: #0000FF;">WHILE</span> <span style="color: #808080;">&#40;</span> @loopCount <span style="color: #808080;">&lt;</span> DATALENGTH<span style="color: #808080;">&#40;</span> @string <span style="color: #808080;">&#41;</span> <span style="color: #808080;">&#41;</span>
      <span style="color: #0000FF;">BEGIN</span>
        <span style="color: #0000FF;">IF</span> <span style="color: #FF00FF;">SUBSTRING</span><span style="color: #808080;">&#40;</span> @string, @loopCount, DATALENGTH<span style="color: #808080;">&#40;</span> @delimiter <span style="color: #808080;">&#41;</span> <span style="color: #808080;">&#41;</span> <span style="color: #808080;">=</span> @delimiter
          <span style="color: #0000FF;">BEGIN</span>
            <span style="color: #0000FF;">SET</span> @tokenCount <span style="color: #808080;">=</span> @tokenCount <span style="color: #808080;">+</span> <span style="color: #000;">1</span>
          <span style="color: #0000FF;">END</span>
        <span style="color: #0000FF;">SET</span> @loopCount <span style="color: #808080;">=</span> @loopCount <span style="color: #808080;">+</span> <span style="color: #000;">1</span>
      <span style="color: #0000FF;">END</span>
    <span style="color: #0000FF;">END</span>
&nbsp;
  <span style="color: #008080;">-- Handle extra count from space being delimiter</span>
  <span style="color: #0000FF;">IF</span> @delimiter <span style="color: #808080;">=</span> <span style="color: #FF0000;">' '</span>
    <span style="color: #0000FF;">SET</span> @tokenCount <span style="color: #808080;">=</span> @tokenCount <span style="color: #808080;">-</span> <span style="color: #000;">1</span>
&nbsp;
  <span style="color: #008080;">-- If there's no token to the right of the last delimiter, then count that</span>
  <span style="color: #008080;">-- as an empty token.</span>
  <span style="color: #0000FF;">IF</span> <span style="color: #808080;">&#40;</span> <span style="color: #0000FF;">RIGHT</span><span style="color: #808080;">&#40;</span> @string, <span style="color: #000;">1</span> <span style="color: #808080;">&#41;</span> <span style="color: #808080;">=</span> @delimiter <span style="color: #808080;">&#41;</span> 
  <span style="color: #0000FF;">BEGIN</span>
    <span style="color: #0000FF;">SET</span> @tokenCount <span style="color: #808080;">=</span> @tokenCount <span style="color: #808080;">+</span> <span style="color: #000;">1</span>
  <span style="color: #0000FF;">END</span>
&nbsp;
  <span style="color: #0000FF;">RETURN</span> @tokenCount
&nbsp;
<span style="color: #0000FF;">END</span>
GO</pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">------------------------------------------------------------------</span>
<span style="color: #008080;">-- Functions like ColdFusion's ListLast()</span>
<span style="color: #008080;">-- Gets token value that's been separated by a delimiter.</span>
<span style="color: #008080;">--</span>
<span style="color: #008080;">-- Example:</span>
<span style="color: #008080;">--    dbo.ListLast( 'Dan is cool', ' ' )</span>
<span style="color: #008080;">--</span>
<span style="color: #008080;">-- Returns: </span>
<span style="color: #008080;">--    cool</span>
<span style="color: #008080;">------------------------------------------------------------------</span>
&nbsp;
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">FUNCTION</span> <span style="color: #808080;">&#91;</span>dbo<span style="color: #808080;">&#93;</span>.<span style="color: #808080;">&#91;</span>ListLast<span style="color: #808080;">&#93;</span>
<span style="color: #808080;">&#40;</span>
  @string <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span>,
  @delimiter <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">=</span> <span style="color: #FF0000;">','</span>
<span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">RETURNS</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">AS</span>
<span style="color: #0000FF;">BEGIN</span>
&nbsp;
  <span style="color: #0000FF;">RETURN</span> dbo.<span style="color: #202020;">ListGetAt</span><span style="color: #808080;">&#40;</span> @string, dbo.<span style="color: #202020;">ListLen</span><span style="color: #808080;">&#40;</span> @string, @delimiter <span style="color: #808080;">&#41;</span> , @delimiter  <span style="color: #808080;">&#41;</span>
&nbsp;
<span style="color: #0000FF;">END</span>
GO</pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">------------------------------------------------------------------</span>
<span style="color: #008080;">-- Wrapper for GetToken() Function</span>
<span style="color: #008080;">-- Gets token value that's been separated by a delimiter.</span>
<span style="color: #008080;">--</span>
<span style="color: #008080;">-- Example:</span>
<span style="color: #008080;">--    dbo.ListGetAt( 'Dan is cool', 2, ' ' )</span>
<span style="color: #008080;">--</span>
<span style="color: #008080;">-- Returns: </span>
<span style="color: #008080;">--    is</span>
<span style="color: #008080;">------------------------------------------------------------------</span>
&nbsp;
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">FUNCTION</span> <span style="color: #808080;">&#91;</span>dbo<span style="color: #808080;">&#93;</span>.<span style="color: #808080;">&#91;</span>ListGetAt<span style="color: #808080;">&#93;</span>
<span style="color: #808080;">&#40;</span>
  @string <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span>,
  @token <span style="color: #0000FF;">INT</span>,
  @delimiter <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span>
<span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">RETURNS</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">AS</span>
<span style="color: #0000FF;">BEGIN</span>
  <span style="color: #0000FF;">RETURN</span> dbo.<span style="color: #202020;">GetToken</span><span style="color: #808080;">&#40;</span> @string, @token, @delimiter <span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">END</span>
GO</pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">------------------------------------------------------------------</span>
<span style="color: #008080;">-- Returns the first item in a tokenized list.</span>
<span style="color: #008080;">--</span>
<span style="color: #008080;">-- Example:</span>
<span style="color: #008080;">--    dbo.ListFirst( 'Dan is cool', ' ' )</span>
<span style="color: #008080;">--</span>
<span style="color: #008080;">-- Returns: </span>
<span style="color: #008080;">--    Dan</span>
<span style="color: #008080;">------------------------------------------------------------------</span>
&nbsp;
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">FUNCTION</span> <span style="color: #808080;">&#91;</span>dbo<span style="color: #808080;">&#93;</span>.<span style="color: #808080;">&#91;</span>ListFirst<span style="color: #808080;">&#93;</span>
<span style="color: #808080;">&#40;</span>
  @string <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span>,
  @delimiter <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">=</span> <span style="color: #FF0000;">','</span>
<span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">RETURNS</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">AS</span>
<span style="color: #0000FF;">BEGIN</span>
&nbsp;
  <span style="color: #0000FF;">RETURN</span> dbo.<span style="color: #202020;">ListGetAt</span><span style="color: #808080;">&#40;</span> @string, <span style="color: #000;">1</span>, @delimiter <span style="color: #808080;">&#41;</span>
&nbsp;
<span style="color: #0000FF;">END</span>
GO</pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
</pre></td><td class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">------------------------------------------------------------------</span>
<span style="color: #008080;">-- Functions similarly like ColdFusion GetToken() Function.</span>
<span style="color: #008080;">-- Gets token value that's been separated by a delimiter.</span>
<span style="color: #008080;">--</span>
<span style="color: #008080;">-- Example:</span>
<span style="color: #008080;">--    dbo.GetToken( 'Dan is cool', 2, ' ' )</span>
<span style="color: #008080;">--</span>
<span style="color: #008080;">-- Returns: </span>
<span style="color: #008080;">--    is</span>
<span style="color: #008080;">------------------------------------------------------------------</span>
&nbsp;
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">FUNCTION</span> <span style="color: #808080;">&#91;</span>dbo<span style="color: #808080;">&#93;</span>.<span style="color: #808080;">&#91;</span>GetToken<span style="color: #808080;">&#93;</span>
<span style="color: #808080;">&#40;</span>
  @string <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span>,
  @tokenPosition <span style="color: #0000FF;">INT</span>,
  @delimiter <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span>
<span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">RETURNS</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">AS</span>
<span style="color: #0000FF;">BEGIN</span>
&nbsp;
  <span style="color: #0000FF;">DECLARE</span> @position <span style="color: #0000FF;">AS</span> <span style="color: #0000FF;">INT</span>
  <span style="color: #0000FF;">DECLARE</span> @token <span style="color: #0000FF;">AS</span> <span style="color: #0000FF;">VARCHAR</span> <span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span>
  <span style="color: #0000FF;">DECLARE</span> @counter <span style="color: #0000FF;">AS</span> <span style="color: #0000FF;">INT</span>
&nbsp;
  <span style="color: #0000FF;">SELECT</span> @string <span style="color: #808080;">=</span> @string <span style="color: #808080;">+</span> @delimiter,
         @counter <span style="color: #808080;">=</span> <span style="color: #000;">1</span>,
         @position <span style="color: #808080;">=</span> <span style="color: #000;">0</span>,
         @token <span style="color: #808080;">=</span> <span style="color: #FF0000;">''</span>
&nbsp;
  <span style="color: #0000FF;">WHILE</span> <span style="color: #808080;">&#40;</span> <span style="color: #FF00FF;">PATINDEX</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'%'</span> <span style="color: #808080;">+</span> @delimiter <span style="color: #808080;">+</span> <span style="color: #FF0000;">'%'</span> , @string <span style="color: #808080;">&#41;</span> <span style="color: #808080;">&lt;&gt;</span> <span style="color: #000;">0</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">AND</span> <span style="color: #808080;">&#40;</span> @tokenPosition <span style="color: #808080;">+</span> <span style="color: #000;">1</span> <span style="color: #808080;">&lt;&gt;</span> @counter <span style="color: #808080;">&#41;</span>
  <span style="color: #0000FF;">BEGIN</span>
    <span style="color: #0000FF;">SELECT</span> @position <span style="color: #808080;">=</span> <span style="color: #FF00FF;">PATINDEX</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'%'</span> <span style="color: #808080;">+</span> @delimiter <span style="color: #808080;">+</span> <span style="color: #FF0000;">'%'</span> , @string<span style="color: #808080;">&#41;</span>,
           @token    <span style="color: #808080;">=</span> <span style="color: #0000FF;">LEFT</span><span style="color: #808080;">&#40;</span>@string, @position<span style="color: #808080;">-</span><span style="color: #000;">1</span><span style="color: #808080;">&#41;</span>,
           @string   <span style="color: #808080;">=</span> <span style="color: #FF00FF;">STUFF</span><span style="color: #808080;">&#40;</span>@string, <span style="color: #000;">1</span>, @position, null<span style="color: #808080;">&#41;</span>,
           @counter  <span style="color: #808080;">=</span> @counter <span style="color: #808080;">+</span> <span style="color: #000;">1</span>
  <span style="color: #0000FF;">END</span>
&nbsp;
  <span style="color: #0000FF;">RETURN</span> @token
<span style="color: #0000FF;">END</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
</pre></td><td class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">------------------------------------------------------------------</span>
<span style="color: #008080;">-- Chops the last character if it's @chopped</span>
<span style="color: #008080;">--</span>
<span style="color: #008080;">-- Example:</span>
<span style="color: #008080;">--    dbo.ChopIf( 'Dan is cool!', '!' )</span>
<span style="color: #008080;">--</span>
<span style="color: #008080;">-- Returns: </span>
<span style="color: #008080;">--    Dan is cool</span>
<span style="color: #008080;">------------------------------------------------------------------</span>
&nbsp;
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">FUNCTION</span> <span style="color: #808080;">&#91;</span>dbo<span style="color: #808080;">&#93;</span>.<span style="color: #808080;">&#91;</span>ChopIf<span style="color: #808080;">&#93;</span>
<span style="color: #808080;">&#40;</span>
  @string <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span>,
  @chopped <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span>
<span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">RETURNS</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2000</span><span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">AS</span>
<span style="color: #0000FF;">BEGIN</span>
&nbsp;
  <span style="color: #0000FF;">IF</span> <span style="color: #808080;">&#40;</span> <span style="color: #0000FF;">RIGHT</span><span style="color: #808080;">&#40;</span> @string, DATALENGTH<span style="color: #808080;">&#40;</span>@chopped<span style="color: #808080;">&#41;</span> <span style="color: #808080;">&#41;</span> <span style="color: #808080;">=</span> @chopped <span style="color: #808080;">&#41;</span>
  <span style="color: #0000FF;">BEGIN</span>
    <span style="color: #0000FF;">SET</span> @string <span style="color: #808080;">=</span> <span style="color: #0000FF;">LEFT</span><span style="color: #808080;">&#40;</span> @string, DATALENGTH<span style="color: #808080;">&#40;</span> @string <span style="color: #808080;">&#41;</span> <span style="color: #808080;">-</span> DATALENGTH<span style="color: #808080;">&#40;</span> @chopped <span style="color: #808080;">&#41;</span> <span style="color: #808080;">&#41;</span> 
  <span style="color: #0000FF;">END</span> 
&nbsp;
  <span style="color: #0000FF;">RETURN</span> @string
&nbsp;
<span style="color: #0000FF;">END</span>
GO</pre></td></tr></table></div>

<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/04/27/tsql-functions-inspired-by-coldfusions-lists-functions/&amp;submitHeadline=TSQL+Functions+Inspired+By+ColdFusion%26%238217%3Bs+Lists+Functions&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/04/27/tsql-functions-inspired-by-coldfusions-lists-functions/&amp;title=TSQL+Functions+Inspired+By+ColdFusion%26%238217%3Bs+Lists+Functions" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/04/27/tsql-functions-inspired-by-coldfusions-lists-functions/&amp;title=TSQL+Functions+Inspired+By+ColdFusion%26%238217%3Bs+Lists+Functions" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/04/27/tsql-functions-inspired-by-coldfusions-lists-functions/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/04/27/tsql-functions-inspired-by-coldfusions-lists-functions/&amp;title=TSQL+Functions+Inspired+By+ColdFusion%26%238217%3Bs+Lists+Functions" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/04/27/tsql-functions-inspired-by-coldfusions-lists-functions/&amp;bm_description=TSQL+Functions+Inspired+By+ColdFusion%26%238217%3Bs+Lists+Functions" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/04/27/tsql-functions-inspired-by-coldfusions-lists-functions/&amp;T=TSQL+Functions+Inspired+By+ColdFusion%26%238217%3Bs+Lists+Functions" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/04/27/tsql-functions-inspired-by-coldfusions-lists-functions/&amp;title=TSQL+Functions+Inspired+By+ColdFusion%26%238217%3Bs+Lists+Functions" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/04/27/tsql-functions-inspired-by-coldfusions-lists-functions/&amp;title=TSQL+Functions+Inspired+By+ColdFusion%26%238217%3Bs+Lists+Functions" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/04/27/tsql-functions-inspired-by-coldfusions-lists-functions/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/04/27/tsql-functions-inspired-by-coldfusions-lists-functions/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+TSQL+Functions+Inspired+By+ColdFusion%26%238217%3Bs+Lists+Functions+@+http://www.shinylight.com/2010/04/27/tsql-functions-inspired-by-coldfusions-lists-functions/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/04/27/tsql-functions-inspired-by-coldfusions-lists-functions/&amp;t=TSQL+Functions+Inspired+By+ColdFusion%26%238217%3Bs+Lists+Functions" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/04/27/tsql-functions-inspired-by-coldfusions-lists-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RedGate SQL Search</title>
		<link>http://www.shinylight.com/2010/04/24/redgate-sql-search/</link>
		<comments>http://www.shinylight.com/2010/04/24/redgate-sql-search/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 04:26:07 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=936</guid>
		<description><![CDATA[I love this tool. It&#8217;s a free add-on if you own SQL Prompt, RedGate&#8217;s version of intellisense, which is better, in my eyes, than Microsoft&#8217;s. It uses SQL Prompt&#8217;s FTS collection to search for any piece of string in any DB object. It&#8217;s crazy fast. What I like the most though, is the ability to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.red-gate.com/Products/SQL_Search/index.htm">I love this tool</a>. It&#8217;s a free add-on if you own SQL Prompt, RedGate&#8217;s version of intellisense, which is better, in my eyes, than Microsoft&#8217;s. It uses SQL Prompt&#8217;s FTS collection to search for any piece of string in any DB object. It&#8217;s crazy fast. What I like the most though, is the ability to right click on a result, and move the focus to appropriate DB object in the explorer panel. Hit CTRL+ALT+D to trigger the search screen and start typing away. </p>
<p><img src="http://www.shinylight.com/wp-content/uploads/2010/04/found_objects_large-Custom.png" alt="" title="found_objects_large (Custom)" width="600" height="342" class="alignnone size-full wp-image-937" /></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/04/24/redgate-sql-search/&amp;submitHeadline=RedGate+SQL+Search&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/04/24/redgate-sql-search/&amp;title=RedGate+SQL+Search" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/04/24/redgate-sql-search/&amp;title=RedGate+SQL+Search" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/04/24/redgate-sql-search/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/04/24/redgate-sql-search/&amp;title=RedGate+SQL+Search" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/04/24/redgate-sql-search/&amp;bm_description=RedGate+SQL+Search" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/04/24/redgate-sql-search/&amp;T=RedGate+SQL+Search" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/04/24/redgate-sql-search/&amp;title=RedGate+SQL+Search" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/04/24/redgate-sql-search/&amp;title=RedGate+SQL+Search" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/04/24/redgate-sql-search/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/04/24/redgate-sql-search/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+RedGate+SQL+Search+@+http://www.shinylight.com/2010/04/24/redgate-sql-search/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/04/24/redgate-sql-search/&amp;t=RedGate+SQL+Search" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/04/24/redgate-sql-search/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connection Problem with SQL Server 2008</title>
		<link>http://www.shinylight.com/2010/04/24/connection-problem-with-sql-server-2008/</link>
		<comments>http://www.shinylight.com/2010/04/24/connection-problem-with-sql-server-2008/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 04:15:55 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=928</guid>
		<description><![CDATA[I can&#8217;t say how many various problems I&#8217;ve had connecting to SQL Server. I&#8217;ve lost count at this point. This was the last one I had, which I&#8217;ve encountered a number of times and always successful to fix it.

Cannot connect to x.x.x.x.
Additional Information:
A network-related or instance-specific error occurred while establishing a connection to SQL Server&#8230;.


Now [...]]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t say how many various problems I&#8217;ve had connecting to SQL Server. I&#8217;ve lost count at this point. This was the last one I had, which I&#8217;ve encountered a number of times and always successful to fix it.</p>
<blockquote><p>
Cannot connect to x.x.x.x.</p>
<p>Additional Information:<br />
A network-related or instance-specific error occurred while establishing a connection to SQL Server&#8230;.
</p></blockquote>
<p><img src="http://www.shinylight.com/wp-content/uploads/2010/04/error-message.png"  /></p>
<p>Now usually when I encounter this error, I do something suggested <a href="http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/">here at Pinal Dave&#8217;s site</a>. This time nothing mentioned there worked. What did work, was me explicitly selecting the Network protocol, and not leaving it as the <default>:</p>
<p><img src="http://www.shinylight.com/wp-content/uploads/2010/04/Step21.png" alt="" title="Step2" width="704" height="503" class="alignnone size-full wp-image-932" /></p>
<p>Still wondering why I have to do this, as I&#8217;ve never had to explicitly select the protocol before, and nothing on the server has changed in years. Will continue to investigate.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/04/24/connection-problem-with-sql-server-2008/&amp;submitHeadline=Connection+Problem+with+SQL+Server+2008&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/04/24/connection-problem-with-sql-server-2008/&amp;title=Connection+Problem+with+SQL+Server+2008" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/04/24/connection-problem-with-sql-server-2008/&amp;title=Connection+Problem+with+SQL+Server+2008" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/04/24/connection-problem-with-sql-server-2008/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/04/24/connection-problem-with-sql-server-2008/&amp;title=Connection+Problem+with+SQL+Server+2008" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/04/24/connection-problem-with-sql-server-2008/&amp;bm_description=Connection+Problem+with+SQL+Server+2008" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/04/24/connection-problem-with-sql-server-2008/&amp;T=Connection+Problem+with+SQL+Server+2008" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/04/24/connection-problem-with-sql-server-2008/&amp;title=Connection+Problem+with+SQL+Server+2008" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/04/24/connection-problem-with-sql-server-2008/&amp;title=Connection+Problem+with+SQL+Server+2008" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/04/24/connection-problem-with-sql-server-2008/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/04/24/connection-problem-with-sql-server-2008/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Connection+Problem+with+SQL+Server+2008+@+http://www.shinylight.com/2010/04/24/connection-problem-with-sql-server-2008/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/04/24/connection-problem-with-sql-server-2008/&amp;t=Connection+Problem+with+SQL+Server+2008" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/04/24/connection-problem-with-sql-server-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compare Table Data</title>
		<link>http://www.shinylight.com/2010/04/04/compare-table-data/</link>
		<comments>http://www.shinylight.com/2010/04/04/compare-table-data/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 03:53:54 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=921</guid>
		<description><![CDATA[Currently I use RedGate&#8217;s SQL Data Compare to see differences in data across databases. It&#8217;s a great product. One thing I love about RedGate is the usability of their products. All of them are intuitive and easy to use. What if you don&#8217;t have the cash to do this though?
You could use the EXCEPT (introduced [...]]]></description>
			<content:encoded><![CDATA[<p>Currently I use <a href="http://www.red-gate.com/products/sql_data_compare/index.htm">RedGate&#8217;s SQL Data Compare</a> to see differences in data across databases. It&#8217;s a great product. One thing I love about RedGate is the usability of their products. All of them are intuitive and easy to use. What if you don&#8217;t have the cash to do this though?</p>
<p>You could use the EXCEPT (introduced in SQL Server 2005) clause to do your comparison. For example:</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;">  <span style="color: #0000FF;">SELECT</span>  <span style="color: #808080;">*</span>  
  <span style="color: #0000FF;">FROM</span>    #table2 <span style="color: #008080;">-- returns 30 records</span>
&nbsp;
  <span style="color: #0000FF;">EXCEPT</span>
&nbsp;
  <span style="color: #0000FF;">SELECT</span>  <span style="color: #808080;">*</span>  
  <span style="color: #0000FF;">FROM</span>    #table1 <span style="color: #008080;">-- returns 10 records.</span></pre></div></div>

<p>You get a result set of 20 records if those 10 records in the table1 statement are in table2. You can think of it as subtracting records from table2 that are in table1. You will get the end result of 20 records. </p>
<p>The following statement builds on that taking the end result and putting it back into table1. This is useful if you want to sync an outdated table (in this case table1) with another table that has additional records (table2).</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">INSERT</span> <span style="color: #0000FF;">INTO</span> #table1
  <span style="color: #0000FF;">SELECT</span>  <span style="color: #808080;">*</span>  
  <span style="color: #0000FF;">FROM</span>    #table2 <span style="color: #008080;">-- latest data table (we'll be copying from here)</span>
&nbsp;
  <span style="color: #0000FF;">EXCEPT</span>
&nbsp;
  <span style="color: #0000FF;">SELECT</span>  <span style="color: #808080;">*</span>
  <span style="color: #0000FF;">FROM</span>    #table1 <span style="color: #008080;">-- outdated table (has old data)</span></pre></div></div>

<p>Other tools to compare data across tables: <a href="http://www.zidsoft.com/">CompareData</a> may let you do what you want, and its table compare is free unlimited, I believe, for the evaluation version. The great thing about this tool is also that it will check results of two SQL statements / stored procs. Useful when unit testing. </p>
<p>Also you can use TableDiff.exe in your &#8220;C:\Program Files\Microsoft SQL Server\90\COM&#8221; directory. Learn more about it at the <a href="http://weblogs.sqlteam.com/mladenp/archive/2007/03/03/60125.aspx">SQL team website</a>.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/04/04/compare-table-data/&amp;submitHeadline=Compare+Table+Data&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/04/04/compare-table-data/&amp;title=Compare+Table+Data" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/04/04/compare-table-data/&amp;title=Compare+Table+Data" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/04/04/compare-table-data/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/04/04/compare-table-data/&amp;title=Compare+Table+Data" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/04/04/compare-table-data/&amp;bm_description=Compare+Table+Data" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/04/04/compare-table-data/&amp;T=Compare+Table+Data" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/04/04/compare-table-data/&amp;title=Compare+Table+Data" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/04/04/compare-table-data/&amp;title=Compare+Table+Data" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/04/04/compare-table-data/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/04/04/compare-table-data/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Compare+Table+Data+@+http://www.shinylight.com/2010/04/04/compare-table-data/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/04/04/compare-table-data/&amp;t=Compare+Table+Data" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/04/04/compare-table-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search for Code in Stored Procedures</title>
		<link>http://www.shinylight.com/2010/03/25/search-for-code-stored-procedures/</link>
		<comments>http://www.shinylight.com/2010/03/25/search-for-code-stored-procedures/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 23:46:21 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=902</guid>
		<description><![CDATA[One handy trick that I used to do was use the function OBJECT_DEFINITION() to view the code of a sproc. It&#8217;s a handy little function that doesn&#8217;t get much love as OBJECT_ID or OBJECT_NAME(). Let&#8217;s say we want to get the code of the sproc dbo.uspGetBillOfMaterials from DB AdventureWorks. We do like so:

SELECT OBJECT_DEFINITION&#40; OBJECT_ID&#40;'dbo.uspGetBillOfMaterials'&#41; [...]]]></description>
			<content:encoded><![CDATA[<p>One handy trick that I used to do was use the function OBJECT_DEFINITION() to view the code of a sproc. It&#8217;s a handy little function that doesn&#8217;t get much love as OBJECT_ID or OBJECT_NAME(). Let&#8217;s say we want to get the code of the sproc dbo.uspGetBillOfMaterials from DB AdventureWorks. We do like so:</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">SELECT</span> OBJECT_DEF<span style="color: #808080;">IN</span>ITION<span style="color: #808080;">&#40;</span> <span style="color: #FF00FF;">OBJECT_ID</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'dbo.uspGetBillOfMaterials'</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">&#41;</span></pre></div></div>

<p>You get a result that may not be too pretty. In this case, use PRINT rather than SELECT, since SSMS strips out line breaks to squeeze it in the cell. </p>
<p>Now let&#8217;s search all available user sprocs in the database to search for the string &#8220;%GetBillOf% :</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">SELECT</span>  OBJECT_DEF<span style="color: #808080;">IN</span>ITION<span style="color: #808080;">&#40;</span> p.<span style="color: #808080;">&#91;</span><span style="color: #FF00FF;">OBJECT_ID</span><span style="color: #808080;">&#93;</span> <span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">AS</span> code 
<span style="color: #0000FF;">FROM</span>    sys.<span style="color: #202020;">procedures</span> p
<span style="color: #0000FF;">WHERE</span>   OBJECT_DEF<span style="color: #808080;">IN</span>ITION<span style="color: #808080;">&#40;</span> p.<span style="color: #808080;">&#91;</span><span style="color: #FF00FF;">OBJECT_ID</span><span style="color: #808080;">&#93;</span> <span style="color: #808080;">&#41;</span> <span style="color: #808080;">LIKE</span> <span style="color: #FF0000;">'%GetBillOf%'</span></pre></div></div>

<p>Now, I do longer search this way since every day I have a job that writes out all DB objects (tables, sprocs, etc.) to a individual files and they get indexed via <a href="http://www.copernic.com/en/products/desktop-search/index.html">Copernic Desktop Search</a>. I script them out using <a href="http://www.shinylight.com/?s=sql+compare&#038;x=0&#038;y=0">SQL Compare</a>. </p>
<p>Unfortunately, I don&#8217;t know why, OBJECT_DEFINITION() doesn&#8217;t work on tables. It&#8217;s been a wanted feature by the community. If you want to learn more about this function, check out:</p>
<ul>
<li><a href="http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/how-to-script-all-stored-procedures-in-a">How to script all stored procedures in a database</a></li>
<li><a href="http://blogs.techrepublic.com.com/datacenter/?p=431">Script Table definitions using TSQL</a></li>
</ul>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/03/25/search-for-code-stored-procedures/&amp;submitHeadline=Search+for+Code+in+Stored+Procedures&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/03/25/search-for-code-stored-procedures/&amp;title=Search+for+Code+in+Stored+Procedures" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/03/25/search-for-code-stored-procedures/&amp;title=Search+for+Code+in+Stored+Procedures" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/03/25/search-for-code-stored-procedures/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/03/25/search-for-code-stored-procedures/&amp;title=Search+for+Code+in+Stored+Procedures" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/03/25/search-for-code-stored-procedures/&amp;bm_description=Search+for+Code+in+Stored+Procedures" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/03/25/search-for-code-stored-procedures/&amp;T=Search+for+Code+in+Stored+Procedures" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/03/25/search-for-code-stored-procedures/&amp;title=Search+for+Code+in+Stored+Procedures" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/03/25/search-for-code-stored-procedures/&amp;title=Search+for+Code+in+Stored+Procedures" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/03/25/search-for-code-stored-procedures/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/03/25/search-for-code-stored-procedures/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Search+for+Code+in+Stored+Procedures+@+http://www.shinylight.com/2010/03/25/search-for-code-stored-procedures/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/03/25/search-for-code-stored-procedures/&amp;t=Search+for+Code+in+Stored+Procedures" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/03/25/search-for-code-stored-procedures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Temporary Stored Procedure</title>
		<link>http://www.shinylight.com/2010/02/19/temporary-stored-procedure/</link>
		<comments>http://www.shinylight.com/2010/02/19/temporary-stored-procedure/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 02:45:17 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=869</guid>
		<description><![CDATA[They can be handy sometimes if you want to modularize your code for the life-time of a routine. To create a temp stored procedure, all you do is use the # sign before the name of the sproc. Same concept as a temp table. Only the owner can execute it and its life is that [...]]]></description>
			<content:encoded><![CDATA[<p>They can be handy sometimes if you want to modularize your code for the life-time of a routine. To create a temp stored procedure, all you do is use the # sign before the name of the sproc. Same concept as a temp table. Only the owner can execute it and its life is that of the session. Here&#8217;s an example that uses the Northwind db.</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">PROCEDURE</span> #GetCustomers 
<span style="color: #808080;">&#40;</span>
  @companyName <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">50</span><span style="color: #808080;">&#41;</span>
<span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">AS</span>
<span style="color: #0000FF;">BEGIN</span>
  <span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">*</span> <span style="color: #0000FF;">FROM</span> Customers
  <span style="color: #0000FF;">WHERE</span>  CompanyName <span style="color: #808080;">LIKE</span> <span style="color: #FF0000;">'%'</span> <span style="color: #808080;">+</span> @companyName <span style="color: #808080;">+</span> <span style="color: #FF0000;">'%'</span>
<span style="color: #0000FF;">END</span></pre></div></div>

<p>To use it:</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">EXEC</span> #GetCustomers <span style="color: #FF0000;">'The'</span></pre></div></div>

<p>You can find the temp sproc in the tempdb:<br />
<img src="http://www.shinylight.com/wp-content/uploads/2010/02/tempdb.png" /></p>
<p>If you want more information on the temp sproc, you can query the system view under the tempdb:</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">*</span> <span style="color: #0000FF;">FROM</span> tempdb.<span style="color: #202020;">sys</span>.<span style="color: #202020;">objects</span>
<span style="color: #0000FF;">WHERE</span> <span style="color: #808080;">&#91;</span><span style="color: #FF00FF;">OBJECT_ID</span><span style="color: #808080;">&#93;</span> <span style="color: #808080;">=</span> <span style="color: #FF00FF;">OBJECT_ID</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'tempdb.dbo.#GetCustomers'</span><span style="color: #808080;">&#41;</span></pre></div></div>

<p>Your next question maybe if you can create temp user defined functions? The answer is a big juicy delicious, &#8220;NO!&#8221; (at least as of SQL Server 2008 Enterprise).</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/02/19/temporary-stored-procedure/&amp;submitHeadline=Temporary+Stored+Procedure&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/02/19/temporary-stored-procedure/&amp;title=Temporary+Stored+Procedure" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/02/19/temporary-stored-procedure/&amp;title=Temporary+Stored+Procedure" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/02/19/temporary-stored-procedure/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/02/19/temporary-stored-procedure/&amp;title=Temporary+Stored+Procedure" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/02/19/temporary-stored-procedure/&amp;bm_description=Temporary+Stored+Procedure" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/02/19/temporary-stored-procedure/&amp;T=Temporary+Stored+Procedure" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/02/19/temporary-stored-procedure/&amp;title=Temporary+Stored+Procedure" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/02/19/temporary-stored-procedure/&amp;title=Temporary+Stored+Procedure" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/02/19/temporary-stored-procedure/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/02/19/temporary-stored-procedure/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Temporary+Stored+Procedure+@+http://www.shinylight.com/2010/02/19/temporary-stored-procedure/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/02/19/temporary-stored-procedure/&amp;t=Temporary+Stored+Procedure" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/02/19/temporary-stored-procedure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server 2008 Installation Errors</title>
		<link>http://www.shinylight.com/2010/01/28/sql-server-2008-installation-errors/</link>
		<comments>http://www.shinylight.com/2010/01/28/sql-server-2008-installation-errors/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 04:47:41 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=765</guid>
		<description><![CDATA[Recently I&#8217;ve had to install SQL Server 2008 on a few machines. Some of these errors made absolutely no sense, but I found solutions that worked for me. Maybe they&#8217;ll help you.

Windows 2000 Server (32-bit)

&#8220;The procedure entry point GetConsoleProcessList could not be located in the dynamic link library KERNEL32.dll.&#8221;
That sounds pretty self-explanatory, right? Actually, this [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve had to install SQL Server 2008 on a few machines. Some of these errors made absolutely no sense, but I found solutions that worked for me. Maybe they&#8217;ll help you.<br />
<br /></p>
<h3>Windows 2000 Server (32-bit)</h3>
<p><br /><img class="alignnone size-full wp-image-766" title="Windows2000 (Custom)" src="http://www.shinylight.com/wp-content/uploads/2010/01/Windows2000-Custom.png" alt="" width="550" height="107" /></p>
<p>&#8220;The procedure entry point GetConsoleProcessList could not be located in the dynamic link library KERNEL32.dll.&#8221;</p>
<p>That sounds pretty self-explanatory, right? Actually, this was the easiest error to make sense of. This is the error you get because SQL Server 2008 is not compatible with Windows 2000 Server. It comes from the fact that SQL Server 2008 needs .NET 3.5+, and that version of .NET is not Windows 2000-compatible.<br />
<br /></p>
<h3>Windows XP and Windows 2003 Server (32-bit)</h3>
<p><br />Surprisingly, I received no errors while trying to install it on Windows XP. Everything went fine with Windows 2003 Server.<br />
<br /></p>
<h3>Windows 7 (64-bit)</h3>
<p><br />OK, this was hell on earth. First I ran the setup, and mid-way through the installation, I received this gem:</p>
<p><img class="alignnone size-full wp-image-769" title="Error-Don't-Have-IE-Open (Custom)" src="http://www.shinylight.com/wp-content/uploads/2010/01/Error-Dont-Have-IE-Open-Custom.png" alt="" width="550" height="140" /></p>
<p>&#8220;SQL Server Setup has encountered the following error:</p>
<p>Invoke or BeginInvoke cannot be called on a control until the window handle has been created..&#8221;</p>
<p>I noticed that this arises if you have the focus on another Window while the installer is running. I was browsing the web via Firefox and I received this. To make sure you don&#8217;t get this, don&#8217;t have any other Window running and only have the focus on the installer.</p>
<p>That wasn&#8217;t the only error I received. When I initially ran the setup, I saw a console window flash and then nothing would happen. (I waited for a few minutes and nothing. Setup.exe wasn&#8217;t even in the task manager.) When you run setup.exe, it fires landingpage.exe, which is the actual wizard installer. Unfortunately, it wasn&#8217;t running it. I even made sure <a href="http://msdn.microsoft.com/en-us/library/ms143506.aspx">I had the requirements</a>, and nothing. I rebooted several times, and finally decided to run landingpage.exe directly. When I ran it, it finally saw the wizard. I was joyful, until it got to this part:</p>
<p><img class="alignnone size-full wp-image-770" title="No-Features-Shown (Custom)" src="http://www.shinylight.com/wp-content/uploads/2010/01/No-Features-Shown-Custom.png" alt="" width="550" height="413" /></p>
<div align="center"><strong>What the heck?! Where are the features? </strong><br />
<img src="http://www.shinylight.com/wp-content/uploads/2010/01/funny-image.gif" alt="" title="funny-image" width="304" height="282" class="alignnone size-full wp-image-781" /></div>
<p>Why would the wizard make it this far and then then not have the features to let me install? This was useless. If you&#8217;re curious, it should&#8217;ve looked like this:</p>
<p><img class="alignnone size-full wp-image-771" title="RC0Inst08 (Custom)" src="http://www.shinylight.com/wp-content/uploads/2010/01/RC0Inst08-Custom.png" alt="" width="550" height="413" /></p>
<p>Then for the heck of it, I decided to Install SQL Server 2008 SP1, without even installing SQL Server 2008 first. Don&#8217;t know why, but it let me install it anyways. Then when I ran the SQL Server 2008 installer again, but this time, I would see these features:</p>
<p><img class="alignnone size-full wp-image-772" title="OnlyGetThis! (Custom)" src="http://www.shinylight.com/wp-content/uploads/2010/01/OnlyGetThis-Custom.png" alt="" width="550" height="413" /></p>
<p>Ugh, still no luck. Finally, the only thing that I could conclude was that I may have a bad installation. So I restored my machine to an earlier restore point (to undo this installation mess) and re-downloaded the installation files.</p>
<p>Voila! No more problems. So that&#8217;s what it was. I was finally able to see all the features to install. So maybe the files got corrupted upon download or it was an incomplete download.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/01/28/sql-server-2008-installation-errors/&amp;submitHeadline=SQL+Server+2008+Installation+Errors&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/01/28/sql-server-2008-installation-errors/&amp;title=SQL+Server+2008+Installation+Errors" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/01/28/sql-server-2008-installation-errors/&amp;title=SQL+Server+2008+Installation+Errors" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/01/28/sql-server-2008-installation-errors/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/01/28/sql-server-2008-installation-errors/&amp;title=SQL+Server+2008+Installation+Errors" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/01/28/sql-server-2008-installation-errors/&amp;bm_description=SQL+Server+2008+Installation+Errors" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/01/28/sql-server-2008-installation-errors/&amp;T=SQL+Server+2008+Installation+Errors" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/01/28/sql-server-2008-installation-errors/&amp;title=SQL+Server+2008+Installation+Errors" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/01/28/sql-server-2008-installation-errors/&amp;title=SQL+Server+2008+Installation+Errors" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/01/28/sql-server-2008-installation-errors/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/01/28/sql-server-2008-installation-errors/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+SQL+Server+2008+Installation+Errors+@+http://www.shinylight.com/2010/01/28/sql-server-2008-installation-errors/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/01/28/sql-server-2008-installation-errors/&amp;t=SQL+Server+2008+Installation+Errors" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/01/28/sql-server-2008-installation-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Pairs Well with Which Database?</title>
		<link>http://www.shinylight.com/2010/01/24/java-pairs-well-with-which-database/</link>
		<comments>http://www.shinylight.com/2010/01/24/java-pairs-well-with-which-database/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 08:07:53 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Careers]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=753</guid>
		<description><![CDATA[In the same way there&#8217;s a tight bond between MySQL and PHP, SQL Server and ASP.NET, SQL Server and ColdFusion &#8211; what goes well with Java? Oracle? Being curious, I started searching in employment web sites. I searched for &#8220;Java&#8221; and one of these databases: Oracle, MySQL, SQL Server and PostgreSQL. (I put in &#8220;SQL [...]]]></description>
			<content:encoded><![CDATA[<p>In the same way there&#8217;s a tight bond between MySQL and PHP, SQL Server and ASP.NET, SQL Server and ColdFusion &#8211; what goes well with Java? Oracle? Being curious, I started searching in employment web sites. I searched for &#8220;Java&#8221; and one of these databases: Oracle, MySQL, SQL Server and PostgreSQL. (I put in &#8220;SQL Server&#8221; using quotes.) The sites used were: craigslist, Monster.com, Dice.com, and Yahoo! Hotjobs.</p>
<p>The numbers signify how many job entries were returned.</p>
<p><a href="http://www.shinylight.com/wp-content/uploads/2010/01/craigslist.jpg"><img class="alignnone size-full wp-image-754" title="craigslist" src="http://www.shinylight.com/wp-content/uploads/2010/01/craigslist.jpg" alt="" width="520" height="222" /></a></p>
<p><a href="http://www.shinylight.com/wp-content/uploads/2010/01/dice.jpg"><img class="alignnone size-full wp-image-755" title="dice" src="http://www.shinylight.com/wp-content/uploads/2010/01/dice.jpg" alt="" width="520" height="223" /></a></p>
<p><a href="http://www.shinylight.com/wp-content/uploads/2010/01/monster.jpg"><img class="alignnone size-full wp-image-756" title="monster" src="http://www.shinylight.com/wp-content/uploads/2010/01/monster.jpg" alt="" width="520" height="223" /></a></p>
<p><a href="http://www.shinylight.com/wp-content/uploads/2010/01/yahoo.jpg"><img class="alignnone size-full wp-image-757" title="yahoo" src="http://www.shinylight.com/wp-content/uploads/2010/01/yahoo.jpg" alt="" width="520" height="240" /></a></p>
<p><a href="http://www.shinylight.com/wp-content/uploads/2010/01/total11.jpg"><img class="alignnone size-full wp-image-758" title="total11" src="http://www.shinylight.com/wp-content/uploads/2010/01/total11.jpg" alt="" width="517" height="437" /></a></p>
<p>So it does seem Oracle goes with Java. Also I noticed how many people call &#8220;SQL Server&#8221; just &#8220;SQL.&#8221; Sort of confusing and hard to tell if they&#8217;re referring to the platform or language.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/01/24/java-pairs-well-with-which-database/&amp;submitHeadline=Java+Pairs+Well+with+Which+Database%3F&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/01/24/java-pairs-well-with-which-database/&amp;title=Java+Pairs+Well+with+Which+Database%3F" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/01/24/java-pairs-well-with-which-database/&amp;title=Java+Pairs+Well+with+Which+Database%3F" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/01/24/java-pairs-well-with-which-database/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/01/24/java-pairs-well-with-which-database/&amp;title=Java+Pairs+Well+with+Which+Database%3F" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/01/24/java-pairs-well-with-which-database/&amp;bm_description=Java+Pairs+Well+with+Which+Database%3F" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/01/24/java-pairs-well-with-which-database/&amp;T=Java+Pairs+Well+with+Which+Database%3F" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/01/24/java-pairs-well-with-which-database/&amp;title=Java+Pairs+Well+with+Which+Database%3F" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/01/24/java-pairs-well-with-which-database/&amp;title=Java+Pairs+Well+with+Which+Database%3F" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/01/24/java-pairs-well-with-which-database/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/01/24/java-pairs-well-with-which-database/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Java+Pairs+Well+with+Which+Database%3F+@+http://www.shinylight.com/2010/01/24/java-pairs-well-with-which-database/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/01/24/java-pairs-well-with-which-database/&amp;t=Java+Pairs+Well+with+Which+Database%3F" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/01/24/java-pairs-well-with-which-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
