<?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>codegumbo &#187; SQLServerPedia Syndication</title>
	<atom:link href="http://codegumbo.com/index.php/category/sqlserverpedia-syndication/feed/" rel="self" type="application/rss+xml" />
	<link>http://codegumbo.com</link>
	<description>Laissez Les Bon Code Roulez!</description>
	<lastBuildDate>Fri, 03 Feb 2012 00:43:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Quick and Easy SQL Script</title>
		<link>http://codegumbo.com/index.php/2012/02/02/quick-and-easy-sql-script/</link>
		<comments>http://codegumbo.com/index.php/2012/02/02/quick-and-easy-sql-script/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 00:43:59 +0000</pubDate>
		<dc:creator>stuart</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>

		<guid isPermaLink="false">http://codegumbo.com/?p=545</guid>
		<description><![CDATA[I haven’t been blogging enough lately, so I’m going to try something new to get past this mild case of writer’s block.&#160; Instead of trying to do a long, in-depth post on some esoteric subject, I’m going to just put out a simple SQL script.&#160; This one’s a bit of a hack, but you’ll see [...]]]></description>
			<content:encoded><![CDATA[<p>I haven’t been blogging enough lately, so I’m going to try something new to get past this mild case of writer’s block.&#160; Instead of trying to do a long, in-depth post on some esoteric subject, I’m going to just put out a simple SQL script.&#160; This one’s a bit of a hack, but you’ll see a lot of variations on it: <strong>Coalescing rows using for XML</strong>.&#160; For example, here’s a few questions from StackOverflow:</p>
<p><a href="http://stackoverflow.com/questions/7872507/cursor-in-stored-procedure">Cursor in stored procedure</a></p>
<p><a href="http://stackoverflow.com/questions/5536754/how-to-comma-separate-multiple-rows-obtained-from-a-sql-query">How to Comma separate multiple rows obtained from a SQL Query</a></p>
<p><a href="http://stackoverflow.com/questions/887628/convert-multiple-rows-into-one-with-comma-as-separator">Convert multiple rows into one with comma as separator</a></p>
<p>The basic challenge is to denormalize your resultset so that multiple rows get returned as a single delimited string; while there are several methods for solving this problem, the one that I like (as of SQL 2005) is to use FOR XML PATH, like so:</p>
<p> <code style="font-size: 12px"><span style="color: blue">BEGIN TRAN      </p>
<p>DECLARE </span><span style="color: #434343">@t </span><span style="color: blue">TABLE </span><span style="color: gray">( </span><span style="color: black">fruit </span><span style="color: blue">VARCHAR</span><span style="color: gray">(</span><span style="color: black">10</span><span style="color: gray">) )      </p>
<p></span><span style="color: blue">INSERT&#160; INTO </span><span style="color: #434343">@t      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: gray">( </span><span style="color: black">fruit      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: gray">)      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">SELECT&#160; </span><span style="color: red">'apple'      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">UNION </span><span style="color: gray">ALL      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">SELECT&#160; </span><span style="color: red">'banana'      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">UNION </span><span style="color: gray">ALL      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">SELECT&#160; </span><span style="color: red">'tomato'      </p>
<p></span><span style="color: blue">SELECT&#160; </span><span style="color: red">',' </span><span style="color: gray">+ </span><span style="color: black">fruit      <br /></span><span style="color: blue">FROM&#160;&#160;&#160; </span><span style="color: #434343">@t      <br /></span><span style="color: blue">FOR&#160;&#160;&#160;&#160; XML </span><span style="color: black">PATH      </p>
<p></span><span style="color: blue">SELECT&#160; </span><span style="color: red">',' </span><span style="color: gray">+ </span><span style="color: black">fruit      <br /></span><span style="color: blue">FROM&#160;&#160;&#160; </span><span style="color: #434343">@t      <br /></span><span style="color: blue">FOR&#160;&#160;&#160;&#160; XML </span><span style="color: black">PATH</span><span style="color: gray">(</span><span style="color: red">''</span><span style="color: gray">)      </p>
<p></span><span style="color: blue">SELECT&#160; </span><span style="color: magenta">STUFF</span><span style="color: gray">(( </span><span style="color: blue">SELECT&#160; </span><span style="color: red">',' </span><span style="color: gray">+ </span><span style="color: black">fruit      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">FROM&#160;&#160;&#160; </span><span style="color: #434343">@t      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">FOR      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; XML </span><span style="color: black">PATH</span><span style="color: gray">(</span><span style="color: red">''</span><span style="color: gray">)      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ), </span><span style="color: black">1</span><span style="color: gray">, </span><span style="color: black">1</span><span style="color: gray">, </span><span style="color: red">''</span><span style="color: gray">) </span><span style="color: blue">AS </span><span style="color: black">fruits      </p>
<p></span><span style="color: blue">ROLLBACK      <br /></span></code>
<p>&#160;</p>
<p>The multiple results sets are there to illustrate each step in the process; for example, the first output shows what happens when you specify FOR XML PATH with no indicators; SQL Server automatically assigns each row in the resultset to a node named &lt;row&gt;:</p>
<blockquote><p>&lt;row&gt;,apple&lt;/row&gt;      <br />&lt;row&gt;,banana&lt;/row&gt;       <br />&lt;row&gt;,tomato&lt;/row&gt;</p>
</blockquote>
<p>If you specify a tag name in the PATH function, each row will be replaced with that tag name; in the above example, we want an empty tag (‘’).&#160; The result is an XML fragment with no tags:</p>
<blockquote><p>,apple,banana,tomato</p>
</blockquote>
<p>That&#8217;s almost what we want, except we need to get rid of the leading comma.&#160; The STUFF command basically replaces the characters in the string supplied (the first parameter; our query FOR XML PATH) starting at a certain position (1 in the example above) and moving forward the specified number of character places (1, the third parameter) with the value of the last parameter (an empty space; the fourth parameter).&#160; The final output is a comma delimited string:</p>
<blockquote><p>apple,banana,tomato</p>
</blockquote>
<p>Straightforward; gotta return to writing.</p>
]]></content:encoded>
			<wfw:commentRss>http://codegumbo.com/index.php/2012/02/02/quick-and-easy-sql-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Year&#8217;s Post 2012 (the where-have-YOU-been post)</title>
		<link>http://codegumbo.com/index.php/2012/01/09/new-years-post-2012-the-where-have-you-been-post/</link>
		<comments>http://codegumbo.com/index.php/2012/01/09/new-years-post-2012-the-where-have-you-been-post/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 17:36:00 +0000</pubDate>
		<dc:creator>stuart</dc:creator>
				<category><![CDATA[Blogging is FUN!]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>

		<guid isPermaLink="false">http://codegumbo.com/?p=540</guid>
		<description><![CDATA[OK, so around November last year, I fell off the grid.&#160; Stopped posting in the middle of a series.&#160; Just walked away.&#160; And now, like a bad high school relationship, I’ve popped back up and begged you to start reading my blog again.&#160; I swear I had good intentions, and I promise I didn’t cheat [...]]]></description>
			<content:encoded><![CDATA[<p>OK, so around November last year, I fell off the grid.&#160; Stopped posting in the middle of a series.&#160; Just walked away.&#160; And now, like a bad high school relationship, I’ve popped back up and begged you to start reading my blog again.&#160; I swear I had good intentions, and I promise I didn’t cheat on you with that other set of readers; you know, the ones with the short skirts and the car…&#160; I digress.</p>
<p>November and December were a career-changing period for me; things happened that were good, but left me extremely busy at work.&#160; I chose to spend my free time focusing on family time, and I let other things (like my blog and my contributions to the SQL Server community) slide.&#160; Since it’s now a week into January, I thought I would start anew, and try to kick off the year on a good foot.&#160;&#160; Instead of making specific resolutions (which I’ll probably break), let me pick a direction and head that way.</p>
<p><strong>First, I want to continue to focus on my family. </strong> Last year was an amazing year for me; I got married during the summer, and I had to relearn some things about a healthy family structure.&#160; The first rule is that it takes more than just time; it takes an effort to communicate about things, including those things that are not always easy to say.&#160; If you’ve followed my blog at all, you know that this is my second marriage; my first marriage ended in part because I stopped participating.&#160; Hopefully, I’ve learned from that.</p>
<p>However, I didn’t just bring me into this new union of souls; I have two teenage daughters that I’ve brought along with me.&#160;&#160; They need time to get to know their new extended family as well (they now have 10 grandparents, and uncles, aunts, and cousins), and I need to make sure that I keep investing my time in them as well as my wife.&#160;&#160; I love these three women very much, and I need to do everything I can to make sure that they know that.&#160;&#160; I guess I’m just stating that to lay out the framework for the principles that are following.</p>
<p><strong>Second, I need to focus on my new career.</strong>&#160; I got promoted to a management position in mid-November.&#160; I’ve worked for this company for 9 years, and although I’ve been the senior member of the development team for most of that time, this is my first management position ever; I’m now the manager of a newly-formed team of Database Administrators, which means it’s a strange new world for me.&#160; I’ve got to learn to do things a little differently; my goal is not to solve problems, but rather to empower others to solve problems. </p>
<p><strong>Third, I want to be more diligent about my contributions to the community.</strong>&#160;&#160; This means that I need to lay out specific time for blogging, and other community activities (I’m the treasurer for <a href="http://atlantamdf.com">AtlantaMDF</a>, as well as the organizer for the <a href="http://www.sqlsaturday.com/111/default.aspx">Eleventy-First SQL Saturday</a>).&#160; I also need to be more focused in my activities; I’ve spent a lot of time recently on <a href="http://stackoverflow.com/users/184112/stuart-ainsworth">StackOverflow</a>, and I probably need to be less obsessive about that; I need scheduled activities, not hit-or-miss.</p>
<p>&#160;</p>
<p>So there you have it; my simple return to blogging and my New Year’s “resolutions” all wrapped up in a simple package.&#160; I’m still going to have to find time to finish the last series I started, but I’m hoping to find some time in the next few days.&#160; Take me back, just one more time. Please?</p>
]]></content:encoded>
			<wfw:commentRss>http://codegumbo.com/index.php/2012/01/09/new-years-post-2012-the-where-have-you-been-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stuff in the FROM clause: Virtual Structures</title>
		<link>http://codegumbo.com/index.php/2011/10/31/stuff-in-the-from-clause-virtual-structures/</link>
		<comments>http://codegumbo.com/index.php/2011/10/31/stuff-in-the-from-clause-virtual-structures/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 18:43:48 +0000</pubDate>
		<dc:creator>stuart</dc:creator>
				<category><![CDATA[Something New]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>

		<guid isPermaLink="false">http://codegumbo.com/index.php/2011/10/31/stuff-in-the-from-clause-virtual-structures/</guid>
		<description><![CDATA[Continuing with my SQL Server basics series, I’m focusing this post on Stuff in the FROM clause: Virtual Structures.&#160; My last post talked about the only Base structure in a relational database, but I’m now moving on to a slightly more complicated concept.&#160; Virtual structures are database objects that don’t hold data in a tabular [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing with my <a href="http://codegumbo.com/index.php/2011/10/17/stuff-in-the-from-clause-table/">SQL Server basics series</a>, I’m focusing this post on Stuff in the FROM clause: Virtual Structures.&#160; My last post talked about the only Base structure in a relational database, but I’m now moving on to a slightly more complicated concept.&#160; Virtual structures are database objects that don’t hold data in a tabular structure, but can interface with data in a tabular format.&#160; It’s probably best to start with the most common virtual structure, the VIEW:</p>
<h1>VIEWs</h1>
<p>According to <a href="http://msdn.microsoft.com/en-us/library/ms187956.aspx" target="_blank">Books Online</a>, VIEWs create &quot;a virtual table whose contents (columns and rows) are defined by a query. Use this statement to create a view of the data in one or more tables in the database.”&#160; A view encapsulates a SQL SELECT statement to return data, and can be used to provide an alternate representation of data from the original tables.&#160; For example, the following VIEW returns columns from both the Person and Employees tables in the AdventureWorks sample database:</p>
<p> <code style="font-size: 12px"><span style="color: black">     <br /></span><span style="color: blue">USE </span><span style="color: black">AdventureWorks2008R2 </span><span style="color: gray">;      <br /></span><span style="color: black">GO      <br /></span><span style="color: blue">IF </span><span style="color: magenta">OBJECT_ID </span><span style="color: gray">(</span><span style="color: red">'hiredate_view'</span><span style="color: gray">, </span><span style="color: red">'V'</span><span style="color: gray">) </span><span style="color: blue">IS </span><span style="color: gray">NOT NULL      <br /></span><span style="color: blue">DROP VIEW </span><span style="color: black">hiredate_view </span><span style="color: gray">;      <br /></span><span style="color: black">GO      <br /></span><span style="color: blue">CREATE VIEW </span><span style="color: black">hiredate_view      <br /></span><span style="color: blue">AS      <br />SELECT </span><span style="color: black">p.FirstName</span><span style="color: gray">, </span><span style="color: black">p.LastName</span><span style="color: gray">, </span><span style="color: black">e.BusinessEntityID</span><span style="color: gray">, </span><span style="color: black">e.HireDate      <br /></span><span style="color: blue">FROM </span><span style="color: black">HumanResources.Employee e      <br /></span><span style="color: blue">JOIN </span><span style="color: black">Person.Person </span><span style="color: blue">AS </span><span style="color: black">p </span><span style="color: blue">ON </span><span style="color: black">e.BusinessEntityID </span><span style="color: blue">= </span><span style="color: black">p.BusinessEntityID </span><span style="color: gray">;      <br /></span><span style="color: black">GO      </p>
<p></span></code>
<p>Views are not just read-only; in certain cases, VIEWS can be used to insert or update data into underlying tables.&#160; However, discussion of how this works is beyond the intent of this introduction; refer to Books Online fore more information.</p>
<h1>Table-Valued Functions (TVF)</h1>
<p>Views are not the only virtual structures available in SQL Server; a subset of a user-defined function known as table-valued functions (TVFs) also provide interfaces into the underlying base structures.&#160;&#160; <a href="http://msdn.microsoft.com/en-us/library/ms186755.aspx" target="_blank">Books Onlin</a>e defines table-valued functions as “a Transact-SQL or common language runtime (CLR) routine that accepts parameters, performs an action, such as a complex calculation, and returns the result of that action as… a table.”&#160; There are three types of TVF’s (arranged below in order of increasing complexity): <strong>simple</strong>, <strong>complex</strong>, and <strong>Common Language Runtime</strong>.</p>
<h2>Simple TVFs</h2>
<p>A simple (or inline) table-valued function is probably the easiest virtual structure to grasp beyond a view; in fact, it’s easily compared to a view with parameters.&#160; A simple TVF encapsulates a SQL statement (much like a view), but it allows for the use of parameters to filter the results returned.&#160; For example, the following simple TVF pulls data from multiple tables for a specific StoreID:</p>
<p> <code style="font-size: 12px"><span style="color: blue">USE </span><span style="color: black">AdventureWorks2008R2</span><span style="color: gray">;      <br /></span><span style="color: black">GO      <br /></span><span style="color: blue">IF </span><span style="color: magenta">OBJECT_ID </span><span style="color: gray">(</span><span style="color: red">N'Sales.ufn_SalesByStore'</span><span style="color: gray">, </span><span style="color: red">N'IF'</span><span style="color: gray">) </span><span style="color: blue">IS </span><span style="color: gray">NOT NULL      <br />&#160;&#160;&#160; </span><span style="color: blue">DROP FUNCTION </span><span style="color: black">Sales.ufn_SalesByStore</span><span style="color: gray">;      <br /></span><span style="color: black">GO      <br /></span><span style="color: blue">CREATE FUNCTION </span><span style="color: black">Sales.ufn_SalesByStore </span><span style="color: gray">(</span><span style="color: #434343">@storeid </span><span style="color: blue">INT</span><span style="color: gray">)      <br /></span><span style="color: blue">RETURNS TABLE      <br />AS       <br />RETURN       <br /></span><span style="color: gray">(      <br />&#160;&#160;&#160; </span><span style="color: blue">SELECT </span><span style="color: black">P.ProductID</span><span style="color: gray">, </span><span style="color: black">P.Name</span><span style="color: gray">, </span><span style="color: magenta">SUM</span><span style="color: gray">(</span><span style="color: black">SD.LineTotal</span><span style="color: gray">) </span><span style="color: blue">AS </span><span style="color: red">'Total'      <br />&#160;&#160;&#160; </span><span style="color: blue">FROM </span><span style="color: black">Production.Product </span><span style="color: blue">AS </span><span style="color: black">P      <br />&#160;&#160;&#160; </span><span style="color: blue">JOIN </span><span style="color: black">Sales.SalesOrderDetail </span><span style="color: blue">AS </span><span style="color: black">SD </span><span style="color: blue">ON </span><span style="color: black">SD.ProductID </span><span style="color: blue">= </span><span style="color: black">P.ProductID      <br />&#160;&#160;&#160; </span><span style="color: blue">JOIN </span><span style="color: black">Sales.SalesOrderHeader </span><span style="color: blue">AS </span><span style="color: black">SH </span><span style="color: blue">ON </span><span style="color: black">SH.SalesOrderID </span><span style="color: blue">= </span><span style="color: black">SD.SalesOrderID      <br />&#160;&#160;&#160; </span><span style="color: blue">JOIN </span><span style="color: black">Sales.Customer </span><span style="color: blue">AS </span><span style="color: black">C </span><span style="color: blue">ON </span><span style="color: black">SH.CustomerID </span><span style="color: blue">= </span><span style="color: black">C.CustomerID      <br />&#160;&#160;&#160; </span><span style="color: blue">WHERE </span><span style="color: black">C.StoreID </span><span style="color: blue">= </span><span style="color: #434343">@storeid      <br />&#160;&#160;&#160; </span><span style="color: blue">GROUP BY </span><span style="color: black">P.ProductID</span><span style="color: gray">, </span><span style="color: black">P.Name      <br /></span><span style="color: gray">);      <br /></span><span style="color: black">GO      </p>
<p></span><span style="color: green">--use the new TVF in a query      <br /></span><span style="color: blue">SELECT </span><span style="color: gray">* </span><span style="color: blue">FROM </span><span style="color: black">Sales.ufn_SalesByStore </span><span style="color: gray">(</span><span style="color: black">602</span><span style="color: gray">);      </p>
<p></span></code><br />
<h2>Complex TVFs</h2>
<p>Complex (or multi-statement) TVF’s are much like their simple counterparts, but allow for greater flexibility in T-SQL coding by adopting a procedural approach to returning tabular data.&#160; A complex TVF requires that a table variable (to be covered later) be defined within the function, and then populated by a series of SQL statements.&#160; The below example from Books Online shows how:</p>
<p> <code style="font-size: 12px"><span style="color: blue">USE </span><span style="color: black">AdventureWorks2008R2</span><span style="color: gray">;     <br /></span><span style="color: black">GO     <br /></span><span style="color: blue">IF </span><span style="color: magenta">OBJECT_ID </span><span style="color: gray">(</span><span style="color: red">N'dbo.ufn_FindReports'</span><span style="color: gray">, </span><span style="color: red">N'TF'</span><span style="color: gray">) </span><span style="color: blue">IS </span><span style="color: gray">NOT NULL     <br />&#160;&#160;&#160; </span><span style="color: blue">DROP FUNCTION </span><span style="color: black">dbo.ufn_FindReports</span><span style="color: gray">;     <br /></span><span style="color: black">GO     <br /></span><span style="color: blue">CREATE FUNCTION </span><span style="color: black">dbo.ufn_FindReports </span><span style="color: gray">(</span><span style="color: #434343">@InEmpID </span><span style="color: black">INTEGER</span><span style="color: gray">)     <br /></span><span style="color: blue">RETURNS </span><span style="color: #434343">@retFindReports </span><span style="color: blue">TABLE      <br /></span><span style="color: gray">(     <br />&#160;&#160;&#160; </span><span style="color: black">EmployeeID </span><span style="color: blue">INT PRIMARY KEY </span><span style="color: gray">NOT NULL,     <br />&#160;&#160;&#160; </span><span style="color: black">FirstName </span><span style="color: blue">NVARCHAR</span><span style="color: gray">(</span><span style="color: black">255</span><span style="color: gray">) NOT NULL,     <br />&#160;&#160;&#160; </span><span style="color: black">LastName </span><span style="color: blue">NVARCHAR</span><span style="color: gray">(</span><span style="color: black">255</span><span style="color: gray">) NOT NULL,     <br />&#160;&#160;&#160; </span><span style="color: black">JobTitle </span><span style="color: blue">NVARCHAR</span><span style="color: gray">(</span><span style="color: black">50</span><span style="color: gray">) NOT NULL,     <br />&#160;&#160;&#160; </span><span style="color: black">RecursionLevel </span><span style="color: blue">INT </span><span style="color: gray">NOT NULL     <br />)      <br /></span><span style="color: green">--Returns a result set that lists all the employees who report to the      <br />--specific employee directly or indirectly.*/      <br /></span><span style="color: blue">AS     <br />BEGIN      <br />WITH </span><span style="color: black">EMP_cte</span><span style="color: gray">(</span><span style="color: black">EmployeeID</span><span style="color: gray">, </span><span style="color: black">OrganizationNode</span><span style="color: gray">, </span><span style="color: black">FirstName</span><span style="color: gray">, </span><span style="color: black">LastName</span><span style="color: gray">, </span><span style="color: black">JobTitle</span><span style="color: gray">, </span><span style="color: black">RecursionLevel</span><span style="color: gray">) </span><span style="color: green">-- CTE name and columns     <br />&#160;&#160;&#160; </span><span style="color: blue">AS </span><span style="color: gray">(     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">SELECT </span><span style="color: black">e.BusinessEntityID</span><span style="color: gray">, </span><span style="color: black">e.OrganizationNode</span><span style="color: gray">, </span><span style="color: black">p.FirstName</span><span style="color: gray">, </span><span style="color: black">p.LastName</span><span style="color: gray">, </span><span style="color: black">e.JobTitle</span><span style="color: gray">, </span><span style="color: black">0 </span><span style="color: green">-- Get the initial list of Employees for Manager n     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">FROM </span><span style="color: black">HumanResources.Employee e      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">INNER JOIN </span><span style="color: black">Person.Person p      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">ON </span><span style="color: black">p.BusinessEntityID </span><span style="color: blue">= </span><span style="color: black">e.BusinessEntityID     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">WHERE </span><span style="color: black">e.BusinessEntityID </span><span style="color: blue">= </span><span style="color: #434343">@InEmpID     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">UNION </span><span style="color: gray">ALL     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">SELECT </span><span style="color: black">e.BusinessEntityID</span><span style="color: gray">, </span><span style="color: black">e.OrganizationNode</span><span style="color: gray">, </span><span style="color: black">p.FirstName</span><span style="color: gray">, </span><span style="color: black">p.LastName</span><span style="color: gray">, </span><span style="color: black">e.JobTitle</span><span style="color: gray">, </span><span style="color: black">RecursionLevel </span><span style="color: gray">+ </span><span style="color: black">1 </span><span style="color: green">-- Join recursive member to anchor     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">FROM </span><span style="color: black">HumanResources.Employee e      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">INNER JOIN </span><span style="color: black">EMP_cte     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">ON </span><span style="color: black">e.OrganizationNode.GetAncestor</span><span style="color: gray">(</span><span style="color: black">1</span><span style="color: gray">) </span><span style="color: blue">= </span><span style="color: black">EMP_cte.OrganizationNode     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">INNER JOIN </span><span style="color: black">Person.Person p      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">ON </span><span style="color: black">p.BusinessEntityID </span><span style="color: blue">= </span><span style="color: black">e.BusinessEntityID     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: gray">)     <br /></span><span style="color: green">-- copy the required columns to the result of the function      <br />&#160;&#160; </span><span style="color: blue">INSERT </span><span style="color: #434343">@retFindReports     <br />&#160;&#160; </span><span style="color: blue">SELECT </span><span style="color: black">EmployeeID</span><span style="color: gray">, </span><span style="color: black">FirstName</span><span style="color: gray">, </span><span style="color: black">LastName</span><span style="color: gray">, </span><span style="color: black">JobTitle</span><span style="color: gray">, </span><span style="color: black">RecursionLevel     <br />&#160;&#160; </span><span style="color: blue">FROM </span><span style="color: black">EMP_cte      <br />&#160;&#160; </span><span style="color: blue">RETURN     <br />END</span><span style="color: gray">;     <br /></span><span style="color: black">GO     <br /></span><span style="color: green">-- Example invocation     <br /></span><span style="color: blue">SELECT </span><span style="color: black">EmployeeID</span><span style="color: gray">, </span><span style="color: black">FirstName</span><span style="color: gray">, </span><span style="color: black">LastName</span><span style="color: gray">, </span><span style="color: black">JobTitle</span><span style="color: gray">, </span><span style="color: black">RecursionLevel     <br /></span><span style="color: blue">FROM </span><span style="color: black">dbo.ufn_FindReports</span><span style="color: gray">(</span><span style="color: black">1</span><span style="color: gray">);      </p>
<p></span><span style="color: black">GO     </p>
<p></span></code>
<p>Note that code in a multi-statement TVF can involve several steps before returning the final result-set; caution should be used when using complex TVF’s because the optimizer can not determine the cost of these statements during plan estimation.&#160; In short, the more complex the TVF, the more likely that the plan used by SQL Server will be inaccurate.</p>
<h2>CLR TVF’s</h2>
<p>With the release of SQL Server 2005, Microsoft embedded a limited subset of the functionality from the .NET framework into SQL Server itself, calling it the Common Language Runtime (CLR).&#160; The CLR allows for .NET developers to write and deploy database objects in a managed language (like VB.NET or C#), and allows for very flexible logic for handling data.&#160; A CLR Function is invoked in a fashion similar to other table-valued functions, but the deployment is much more involved (see <a href="http://msdn.microsoft.com/en-us/library/ms186755.aspx" target="_blank">Books Online</a> for an example using the following steps):</p>
<ol>
<li>Code is written and assembled by a compiler (like Visual Studio).</li>
<li>The assembled code must be copied on to the SQL Server.</li>
<li>An ASSEMBLY reference is created in T-SQL, which points to the deployed .dll file, and</li>
<li>a FUNCTION is created which references the ASSEMBLY.</li>
</ol>
<h1>Next up…</h1>
<p>A two-fer: Temporary and Semi-Temporary structures!</p>
]]></content:encoded>
			<wfw:commentRss>http://codegumbo.com/index.php/2011/10/31/stuff-in-the-from-clause-virtual-structures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stuff in the FROM clause: Base Structures</title>
		<link>http://codegumbo.com/index.php/2011/10/17/stuff-in-the-from-clause-table/</link>
		<comments>http://codegumbo.com/index.php/2011/10/17/stuff-in-the-from-clause-table/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 18:40:29 +0000</pubDate>
		<dc:creator>stuart</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>

		<guid isPermaLink="false">http://codegumbo.com/index.php/2011/10/17/stuff-in-the-from-clause-table/</guid>
		<description><![CDATA[A few months ago, our user group started thinking about how we could get new members to start coming to our SQL Server user group meetings; we defined new user as one of two categories: 1: new to databases, or 2. new to SQL Server In both cases, we realized that we needed to start [...]]]></description>
			<content:encoded><![CDATA[<p>A few months ago, our user group started thinking about how we could get new members to start coming to our SQL Server user group meetings; we defined new user as one of two categories:</p>
<p>1: new to databases, or    <br />2. new to SQL Server</p>
<p>In both cases, we realized that we needed to start having new content in our monthly sessions that was targeted specifically for them, so we decided to start adding a brief 10-minute fundamental session to the beginning of each meeting. I chose to do the first one, and selected a topic called Stuff in the FROM clause. I quickly realized that this could be a nice little blog series, so I&#8217;m attempting to expand a 10-minute presentation into a four-part series. Below is the mind map for the presentation:</p>
<p>&#160;</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" src="http://mail.google.com/mail/?attid=0.1&amp;disp=emb&amp;view=att&amp;th=13337641c75bd7cf" width="578" height="456" /></p>
<p><strong>Stuff in the FROM clause: Base Structures</strong></p>
<p>Base Structures as a category name is a bit misleading, because there&#8217;s really only one base structure in any relational database: the table.&#160; Tables are the core of any relational database; they provide storage for data in rows, arranged by columns.&#160; There’s lots of <a href="http://en.wikipedia.org/wiki/Database_table">background information</a> on table design, so I won’t spend too much time on it (even that’s too basic for this discussion), but I will highlight some key features about tables:</p>
<ul>
<li>From an entity design perspective, a table should represent a set of entities.</li>
<ul>
<li>Rows are the un-ordered members of that set</li>
<li>Columns are the attributes of the entity.</li>
</ul>
<li>Table attributes have basic types.</li>
<li>Tables should have a primary key constraint on one of the columns, which is used to uniquely identify a member of that set.</li>
<li>Microsoft SQL Server supports a syntax for computed columns, where data for an attribute can be calculated from other attributes.</li>
</ul>
<p>For Microsoft SQL Server, the CREATE TABLE syntax may be found at: <a title="http://msdn.microsoft.com/en-us/library/ms174979.aspx" href="http://msdn.microsoft.com/en-us/library/ms174979.aspx">http://msdn.microsoft.com/en-us/library/ms174979.aspx</a>&#160; The simplest table creation statement looks like the following:</p>
<blockquote><p>CREATE TABLE table_name (column_name column_type)</p>
</blockquote>
<p>Next: Virtual Structures</p>
]]></content:encoded>
			<wfw:commentRss>http://codegumbo.com/index.php/2011/10/17/stuff-in-the-from-clause-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>#TSQL2sDay Roundup</title>
		<link>http://codegumbo.com/index.php/2011/10/10/tsql2sday-roundup/</link>
		<comments>http://codegumbo.com/index.php/2011/10/10/tsql2sday-roundup/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 14:00:28 +0000</pubDate>
		<dc:creator>stuart</dc:creator>
				<category><![CDATA[Blogging is FUN!]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[TSQL2sDay]]></category>

		<guid isPermaLink="false">http://codegumbo.com/index.php/2011/10/10/tsql2sday-roundup/</guid>
		<description><![CDATA[So the launch was early, and the write-up is delayed.&#160; Time has no meaning….&#160; Truthfully, I’m sorry I didn’t manage to squeeze this summary post in a bit sooner; I have the typical DBA excuse: too much to do, and too little time. One nice thing about this topic is that it seemed to resonate [...]]]></description>
			<content:encoded><![CDATA[<p>So the launch was early, and the write-up is delayed.&#160; Time has no meaning….&#160; Truthfully, I’m sorry I didn’t manage to squeeze this summary post in a bit sooner; I have the typical DBA excuse: too much to do, and too little time. </p>
<p>One nice thing about this topic is that it seemed to resonate with several bloggers who had either strayed away from T-SQL Tuesday or had never participated; hopefully, the bug to write will stick (and I’m pointing the finger at myself for this one as well).</p>
<h3>Beginning at the Beginning:</h3>
<p><img style="display: inline; float: left" alt="" align="left" src="http://1.gravatar.com/avatar/3ad80e5cd80033c4b574b34cc8ffe419?s=48&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&amp;r=G" width="48" height="48" /> <a href="http://blog.sqlauthority.com">Pinal Dave</a> in his gentle teaching style covers several different <a href="http://blog.sqlauthority.com/2011/10/04/sql-server-quick-note-about-join-common-questions-and-simple-answers/" target="_blank">questions and answers</a> about JOIN techniques. Great way to review the basics and get conversations started with beginners.    </p>
<p><img style="display: inline; float: left" alt="" align="left" src="http://0.gravatar.com/avatar/ab17b5e1b1cbc40740e52336482b9807?s=48&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&amp;r=G" width="48" height="48" /> <a href="http://kenj.blogspot.com">KenJ</a> is a bit esoteric, but a great reminder of what resources there are to learn more <a href="http://kenj.blogspot.com/2011/10/join-me.html">about SQL Server.</a></p>
<h3>&#160;</h3>
<h3>JOINs In The Real World:</h3>
<h2></h2>
<p><img style="display: inline; float: left" alt="" align="left" src="http://0.gravatar.com/avatar/2007b7c6d81b6ed86710ece8e2d565e1?s=48&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&amp;r=G" width="48" height="48" /> <a href="http://www.real-sql-guy.com">Tracy McKibben</a> demonstrated a very simple tuning tip based on real production experience: <a href="http://www.real-sql-guy.com/2011/09/t-sql-tuesday-23-nested-joins.html." target="_blank">the Nested JOIN</a></p>
<p>&#160;</p>
<p><a href="http://richbrownesq-sqlserver.blogspot.com">Rich Brown</a> reminds us that good query construction often involves understanding how the optimizer handles <a href="http://richbrownesq-sqlserver.blogspot.com/2011/10/t-sql-helping-optimiser-can-hinder.html">JOINs under the covers.</a></p>
<p><img style="display: inline; float: left" alt="" align="left" src="http://1.gravatar.com/avatar/da3d144d9efe5d6b8e93aaaa2cc703a0?s=48&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&amp;r=G" width="48" height="48" /> <a href="http://nebrasql.blogspot.com/">Andy Galbraith</a> (Yet Another SQL Andy!) reminds us to <a href="http://nebrasql.blogspot.com/2011/10/t-sql-tuesday-23-respect-your-joins.html">Respect Your JOINs</a>. It’s funny how often we assume that database queries are logically well-written when we start looking for performance problems.</p>
<p>&#160;</p>
<p><img style="display: inline; float: left" alt="" align="left" src="http://0.gravatar.com/avatar/e86f57ad09692dd6d39671898de98256?s=48&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&amp;r=G" width="48" height="48" /> <a href="http://www.bobpusateri.com">Bob Pusateri</a> points out that <a href="http://www.bobpusateri.com/archive/2011/10/t-sql-tuesday-23-where-the-join-ends/">WHERE clauses influence JOIN behaviors</a>. You have to look at the entire SQL statement to make sure you’re getting what you’re supposed to be getting.    </p>
<p><img style="display: inline; float: left" alt="" align="left" src="http://0.gravatar.com/avatar/edceb5c6895ba54a06f1486dadeb7433?s=48&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&amp;r=G" width="48" height="48" /> <a href="http://nelsonsweb.net">Matt Nelson</a> reminds us that <a href="http://nelsonsweb.net/2011/10/t-sql-tuesday-23-joins/">unnecessary JOINs are bad</a>, and sometimes you need to dig a little deeper when performance tuning.    </p>
<p>&#160;</p>
<h3>A Little Deeper:</h3>
<p><img style="display: inline; float: left" alt="" align="left" src="http://1.gravatar.com/avatar/94ee7f24a49e19b7779edcfe47a68a9e?s=48&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&amp;r=G" width="48" height="48" /> <a href="http://sqlblog.com/blogs/rob_farley">Rob Farley</a> toasted my brain a little on this post about <a href="http://sqlblog.com/blogs/rob_farley/archive/2011/10/04/joins-without-join.aspx">Joins without JOINs</a>.&#160; It’s a well-written explanation of what an Ant-Semi JOIN is. </p>
<p>&#160;</p>
<p><a href="http://bradsruminations.blogspot.com">Brad Schulz</a> finished the cooking job with a <a href="http://bradsruminations.blogspot.com/2011/10/t-sql-tuesday-023-flip-side-of-join.html">take on Semi-JOINs</a>, among other things.&#160; Is Brad really Rob in reverse? </p>
<p><img style="display: inline; float: left" alt="" align="left" src="http://0.gravatar.com/avatar/a9569e09c9398884cd72db41a325154e?s=48&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&amp;r=G" width="48" height="48" /><a href="http://www.sqlserverblogforum.com/">Muthukkumaran Kaliyamoorthy</a> covered the internal join mechanisms, and why the optimizer chooses <a href="http://www.sqlserverblogforum.com/2011/10/merge-join-vs-hash-join-vs-nested-loop-join/">merge, hash, or nested loop joins</a>.    </p>
<p><img style="display: inline; float: left" alt="" align="left" src="http://0.gravatar.com/avatar/0edf4d76f04d52cdbb0532ce6f8298f2?s=48&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&amp;r=G" width="48" height="48" /> <a href="http://www.sqlmashup.com">Robert Matthew Cook</a> has a couple of <a href="http://www.sqlmashup.com/t-sql-tuesday-23-joins-tsql2sday">great metaphors</a> for explaining Merge, Hash, and Nested Loop JOINs.</p>
<p>&#160;</p>
<p><img style="display: inline; float: left" alt="" align="left" src="http://1.gravatar.com/avatar/bda2a5c5ba5d6ae5b1d3be3be6271224?s=48&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&amp;r=G" width="48" height="48" /> <a href="http://blog.waynesheffield.com/wayne/">Wayne Sheffield</a> pointed out some <a href="http://blog.waynesheffield.com/wayne/archive/2011/10/t-sql-tuesday-23-joins/">interesting syntactical ways of writing</a> JOINs. I’m not sure if I’m comfortable with some of them, but they may be of some use in certain edge scenarios. Or, if you just want to mess with the guy who reviews your code.</p>
<p><img style="display: inline; float: left" alt="" align="left" src="http://1.gravatar.com/avatar/7a280962d7c684d86fa58a1c1c289bf5?s=48&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&amp;r=G" width="48" height="48" /> <a href="http://SQL.RichardDouglas.co.uk">Richard Douglas</a> offers up a short-but-sweet explanation of the relationship of <a href="http://sql.richarddouglas.co.uk/archive/2011/10/t-sql-tuesday-23-key-lookups.html">Key Lookups to JOINs</a>. </p>
<p>     <!--EndFragment--><br />
<h3>&#160;</h3>
<h3>The Future is a Ticking Time Bomb…</h3>
<p><img style="display: inline; float: left" alt="" align="left" src="http://0.gravatar.com/avatar/68f3945bf478970197d593c700ed353f?s=48&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&amp;r=G" width="48" height="48" /> <a href="http://thelonedba.wordpress.com">Thomas Rushton</a> points out that Denali may finally force us to <a href="http://thelonedba.wordpress.com/2011/10/04/t-sql-tuesday-23-non-ansi-joins-discontinued-in-denali/">clean up our code.</a></p>
<p>&#160;</p>
<p>&#160;</p>
<h3>My Portugese is Not Up To Par…</h3>
<p>&#160;<img style="display: inline; float: left" alt="" align="left" src="http://1.gravatar.com/avatar/1dea6ab124515201bfb24fd76d4e5228?s=48&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&amp;r=G" width="48" height="48" />     <br />Finally, <a href="http://leka.com.br">Ricardo Leka</a> wrote a post that I had to use Google Translate to interpret.&#160; I think I lost something in&#160; translation, because I’m not sure how the example relates to JOIN’s, but thought I would include it anyway.&#160; <a href="http://leka.com.br/2011/10/04/t-sql-tuesday-23-joins/">http://leka.com.br/2011/10/04/t-sql-tuesday-23-joins/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://codegumbo.com/index.php/2011/10/10/tsql2sday-roundup/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>#TSQL2sDay T-SQL Tuesday 23&#8211;Early edition</title>
		<link>http://codegumbo.com/index.php/2011/09/27/tsql2sday-t-sql-tuesday-23early-edition/</link>
		<comments>http://codegumbo.com/index.php/2011/09/27/tsql2sday-t-sql-tuesday-23early-edition/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 16:59:13 +0000</pubDate>
		<dc:creator>stuart</dc:creator>
				<category><![CDATA[Blogging is FUN!]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[The Social Web]]></category>
		<category><![CDATA[TSQL2sDay]]></category>

		<guid isPermaLink="false">http://codegumbo.com/index.php/2011/09/27/tsql2sday-t-sql-tuesday-23early-edition/</guid>
		<description><![CDATA[&#160; Time once again for another edition of T-SQL Tuesday!&#160; What’s that, you say?&#160; Early?&#160; Why yes, indeed.&#160; Due to the potential schedule of conflict of PASS’s Summit 2011 occurring on the second Tuesday of October (the normal date for T-SQL Tuesday), I’ve gotten special permission to bump it up a week.&#160; To participate in [...]]]></description>
			<content:encoded><![CDATA[<p><b><img style="display: inline; float: left" alt="T-SQL Tuesday Logo" align="left" src="http://www.pearlknows.com/sitebuildercontent/sitebuilderpictures/T-SQLLogo.JPG" width="145" height="150" /></b></p>
<p>&#160;</p>
<p>Time once again for another edition of T-SQL Tuesday!&#160; What’s that, you say?&#160; Early?&#160; Why yes, indeed.&#160; Due to the potential schedule of conflict of PASS’s Summit 2011 occurring on the second Tuesday of October (the normal date for T-SQL Tuesday), I’ve gotten special permission to bump it up a week.&#160; </p>
<p><strong>To participate in this month’s T-SQL Tuesday, your post must go live between midnight UTC on Tuesday, October 4, 2011 and midnight UTC on Wednesday, October 5.</strong></p>
<p>&#160;</p>
<p>Your post needs to link back to this blog, and if you use the image, anchor it to this post.&#160; Make sure you leave a comment or a trackback to this post (so I can find it later, when I write up the summary).</p>
<p>Topic d’jour?&#160; <strong>JOINS</strong> (I’m in a fundamentals mood lately).&#160; Note that I also like creative and esoteric posts, so if you can find a way to apply SQL as a metaphorical language for community activity, I’ll read it and enjoy it.&#160; If you just want to tell me in a simple fashion the difference between a HASH and MERGE join, I’m cool with that, too.</p>
<p>Do me a favor, though, and please spread the word about the early date.&#160; Looking forward to reading your submissions.</p>
]]></content:encoded>
			<wfw:commentRss>http://codegumbo.com/index.php/2011/09/27/tsql2sday-t-sql-tuesday-23early-edition/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>#sqlsat89 XML 201 Slide decks uploaded</title>
		<link>http://codegumbo.com/index.php/2011/09/19/sqlsat89-xml-201-slide-decks-uploaded/</link>
		<comments>http://codegumbo.com/index.php/2011/09/19/sqlsat89-xml-201-slide-decks-uploaded/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 13:10:48 +0000</pubDate>
		<dc:creator>stuart</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>

		<guid isPermaLink="false">http://codegumbo.com/?p=516</guid>
		<description><![CDATA[Just a quick note to say I uploaded my slides from last weekend&#8217;s SQL Saturday 89; the event was a blast, and I hope to have my wrap up posted soon.   Thanks to all of those who attended; I felt like it was a great class, and I&#8217;m hoping to continue to improve in the [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick note to say I uploaded my <a href="http://www.sqlsaturday.com/viewsession.aspx?sat=89&amp;sessionid=4748">slides</a> from last weekend&#8217;s SQL Saturday 89; the event was a blast, and I hope to have my wrap up posted soon.   Thanks to all of those who attended; I felt like it was a great class, and I&#8217;m hoping to continue to improve in the future.</p>
<blockquote>
<h3>SQL Server XML 201</h3>
<p>The xml datatype in SQL Server expands the potential of the relational platform to store increasingly complex forms of data, but without the use of the appropriate query language, much of that potential can remain unused. This session will cover the basics of SQL Server XQuery and FLWOR; the assumption is that attendees will have some basic exposure to XML (including the use of XML in SQL Server). Learn how to &#8220;run queries within a query&#8221;, and how to extract XML data into a tabular format. Coverage will include the five basic XML methods (.exist(), .value(), .query(), .nodes(), and .modify()) and FLWOR (for, let, where, order by, and return).</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://codegumbo.com/index.php/2011/09/19/sqlsat89-xml-201-slide-decks-uploaded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upcoming presentations&#8230;</title>
		<link>http://codegumbo.com/index.php/2011/09/10/upcoming-presentations-2/</link>
		<comments>http://codegumbo.com/index.php/2011/09/10/upcoming-presentations-2/#comments</comments>
		<pubDate>Sat, 10 Sep 2011 21:40:27 +0000</pubDate>
		<dc:creator>stuart</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[User Groups]]></category>

		<guid isPermaLink="false">http://codegumbo.com/index.php/2011/09/10/upcoming-presentations-2/</guid>
		<description><![CDATA[So, if you’ve been wondering where I’ve been, the answer is “too frikkin’ busy to write”.&#160; Settling in to a new marriage, changes at my job(s), and volunteer work have been a little more&#160; time-consuming than I originally planned.&#160; I’m hoping that’s gonna change in the near future, cause I’ve some great ideas for posts [...]]]></description>
			<content:encoded><![CDATA[<p>So, if you’ve been wondering where I’ve been, the answer is “too frikkin’ busy to write”.&#160; Settling in to a new marriage, changes at my job(s), and volunteer work have been a little more&#160; time-consuming than I originally planned.&#160; I’m hoping that’s gonna change in the near future, cause I’ve some great ideas for posts brewing in the background.</p>
<p>One idea that I’m really excited about is a change in the monthly meetings for <a href="http://atlantamdf.com/" target="_blank">AtlantaMDF</a> (our SQL Server User Group); like most user groups, we have a meet-and-greet followed by a presentation (or two).&#160; The presentations usually cover some mid-level to advanced topic, and usually assume that the attendees have some knowledge with SQL Server.&#160; We’re going to tackle that assumption.</p>
<p>Starting at our next meeting (Monday, September 12), we’re going to present short presentations before the main one that are targeted to new users of SQL Server; the goal is to a) build up our new members, and b) help grow our speaker pool.&#160; I’m excited to present the first topic “Stuff in the FROM clause” on Monday, so if you’re in the Alpharetta area Monday night, come by and see me.</p>
<p>Also coming up is our fourth <a href="http://www.sqlsaturday.com/89/eventhome.aspx" target="_blank">SQL Saturday (#89)</a>; although I haven’t been as involved with the planning on this one as I have in years past, it’s been exciting to see it unfold.&#160; I’m looking forward to presenting a session on XQuery, and hanging out by the user group booth. If you’re gonna be there, stop by and say Hi! </p>
]]></content:encoded>
			<wfw:commentRss>http://codegumbo.com/index.php/2011/09/10/upcoming-presentations-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>#sqlpass&#8211;Last call for Community Choice</title>
		<link>http://codegumbo.com/index.php/2011/07/19/sqlpasslast-call-for-community-choice/</link>
		<comments>http://codegumbo.com/index.php/2011/07/19/sqlpasslast-call-for-community-choice/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 01:09:10 +0000</pubDate>
		<dc:creator>stuart</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>

		<guid isPermaLink="false">http://codegumbo.com/index.php/2011/07/19/sqlpasslast-call-for-community-choice/</guid>
		<description><![CDATA[I’ve been out of pocket for the last couple of weeks (more on that later), but I was very excited to hear that two of my sessions were being considered for the Community Choice slots at PASS Summit this year.&#160; If you haven’t voted yet, please consider voting for me; I’m looking for the opportunity [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been out of pocket for the last couple of weeks (more on that later), but I was very excited to hear that two of my sessions were being considered for the <a href="http://www.sqlpass.org/summit/2011/UserLogin.aspx?returnurl=%2fsummit%2f2011%2fSummitContent%2fCommunityChoice.aspx" target="_blank">Community Choice</a> slots at PASS Summit this year.&#160; If you haven’t voted yet, please consider voting for me; I’m looking for the opportunity to really grow this next year as a technical speaker, and I’d love to kick it off with a bang at Summit.&#160; Voting closes TOMORROW (July 20, 2011), so vote now!</p>
<p><a href="http://www.sqlpass.org/summit/2011/Speakers/CallForSpeakers/SessionDetail.aspx?sid=1120" target="_blank">SQL Server XML 201</a> [Application and Database Development]    <br /><a href="http://www.sqlpass.org/summit/2011/Speakers/CallForSpeakers/SpeakerDetail.aspx?spid=277" target="_blank">Stuart Ainsworth</a> (Gladiator Technology Services)    <br />&#160; <br /><a href="http://www.sqlpass.org/summit/2011/Speakers/CallForSpeakers/SessionDetail.aspx?sid=1239" target="_blank">Basic Guidelines for VLDB&#8217;s</a> [Enterprise Database Administration and Deployment]    <br /><a href="http://www.sqlpass.org/summit/2011/Speakers/CallForSpeakers/SpeakerDetail.aspx?spid=277" target="_blank">Stuart Ainsworth</a> (Gladiator Technology Services)</p>
<p>&#160;</p>
<p>VOTE HERE: <a title="http://www.sqlpass.org/summit/2011/UserLogin.aspx?returnurl=%2fsummit%2f2011%2fSummitContent%2fCommunityChoice.aspx" href="http://www.sqlpass.org/summit/2011/UserLogin.aspx?returnurl=%2fsummit%2f2011%2fSummitContent%2fCommunityChoice.aspx">http://www.sqlpass.org/summit/2011/UserLogin.aspx?returnurl=%2fsummit%2f2011%2fSummitContent%2fCommunityChoice.aspx</a></p>
<p>&#160;</p>
<p>Just as an aside, I’d also like to plug a couple of other sessions by some AtlantaMDF members:</p>
<p>Bad SQL [Application and Database Development]   <br />Geoff Hiten (Intellinet)    <br />&#160; <br />ETL Smackdown: PowerShell vs SSIS &#8212; with Aaron Nelson [BI Architecture, Development and Administration Topics]    <br />Julie Smith (Key2 Consulting)    <br />Aaron Nelson (@SQLvariant)</p>
<p>&#160;</p>
<p>4 out of the 20 sessions being considered for Community Choice are by speakers from my local chapter, which makes me proud. Thanks for your consideration, and more posts to come soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://codegumbo.com/index.php/2011/07/19/sqlpasslast-call-for-community-choice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>distractions and other news&#8230;</title>
		<link>http://codegumbo.com/index.php/2011/07/01/distractions-and-other-news/</link>
		<comments>http://codegumbo.com/index.php/2011/07/01/distractions-and-other-news/#comments</comments>
		<pubDate>Fri, 01 Jul 2011 20:30:14 +0000</pubDate>
		<dc:creator>stuart</dc:creator>
				<category><![CDATA[Blogging is FUN!]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>

		<guid isPermaLink="false">http://codegumbo.com/index.php/2011/07/01/distractions-and-other-news/</guid>
		<description><![CDATA[Sorry for the absence from blogging for a bit; a lot on my plate.&#160; Next week, I’ll be turning 40 on July 5th, and then getting married on July 9th.&#160; The latter is much bigger news than the former, but both are reasons to celebrate. Another reason to celebrate?&#160; I got accepted to speak at [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry for the absence from blogging for a bit; a lot on my plate.&#160; Next week, I’ll be turning 40 on July 5th, and then getting married on July 9th.&#160; The latter is much bigger news than the former, but both are reasons to celebrate.</p>
<p>Another reason to celebrate?&#160; I got accepted to speak at <a href="http://www.sqlsaturday.com/viewsession.aspx?sat=64&amp;sessionid=4583" target="_blank">SQL Saturday 64 (Baton Rouge)</a>.&#160; I’m excited to head back home for good food and good times.&#160; I needed a little affirmation after the disappointment over Summit.</p>
<p>Anyway, I may not blog much in the next few weeks; please stay tuned, because good things are happening.</p>
]]></content:encoded>
			<wfw:commentRss>http://codegumbo.com/index.php/2011/07/01/distractions-and-other-news/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

