<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/4.0.3" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>All Blogs - Author(s): George Mastros (gmmastros)</title>
		<link>http://blogs.lessthandot.com/index.php/All/</link>
		<atom:link rel="self" type="application/rss+xml" href="http://blogs.lessthandot.com/index.php/All/?tempskin=_rss2" />
		<description>LessThanDot A Technical Community for IT Professionals</description>
		<language>en-US</language>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=4.0.3"/>
		<ttl>60</ttl>
				<item>
			<title>Finding Exact Duplicate Indexes</title>
			<link>http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/finding-exact-duplicate-indexes</link>
			<pubDate>Thu, 12 Apr 2012 17:14:00 +0000</pubDate>			<dc:creator>George Mastros (gmmastros)</dc:creator>
			<category domain="main">Data Modelling &amp; Design</category>
<category domain="alt">Microsoft SQL Server Admin</category>
<category domain="alt">Microsoft SQL Server</category>			<guid isPermaLink="false">1700@http://blogs.lessthandot.com/</guid>
						<description>&lt;p&gt;This blog is not meant to be a comprehensive explanation of indexes.  It is meant to help you determine if there are duplicate indexes within your database.  There appears to be some debate regarding what is a duplicate index.  This article defines an &amp;#8220;Exact Duplicate Index&amp;#8221; where there are multiple non-clustered indexes with exactly the same keys and include columns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This query will ignore clustered indexes.&lt;/strong&gt;&lt;br /&gt;
It is possible to create a non-clustered index with keys that match a clustered index.  Sometimes, this could be considered a duplicate index, and sometimes it should not be considered a duplicate.  For example, suppose you have a wide table so that there is only one row per data page.  Also suppose you have a query that only needs to use the key columns.  It will be faster to use a non-clustered index for the query instead of the clustered index because the non-clustered index would only include the key columns, and you will get more columns per data page.  The non-clustered index would require less file I/O, and therefore increased performance.&lt;/p&gt;

&lt;p&gt;If you have a wide table with many rows, a non-clustered index that matches the key columns of the clustered index will improve performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This query will ignore partial duplicates with similar keys.&lt;/strong&gt;&lt;br /&gt;
It is possible to create indexes with similar keys, and sometimes it is beneficial to do so.  For example, suppose you had an index with key columns (Col1, Col2) and another with (Col1, Col2, Col3).  You probably don&amp;#8217;t need the first index because the second index will suffice.  However, there are cases where Col3 could be wide and using it would cause extra I/O compared to the first index.  It is probably rare that you would see any difference in performance between these indexes.  I will be writing another article that explains this in depth and provides a query that will return these possible duplicates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This query will ignore partial duplicates with the same keys and similar includes.&lt;/strong&gt;&lt;br /&gt;
Column ordering for include columns does not matter, but which columns are included can make a big difference in the performance of a query.  There could be similar indexes that have the same key columns but different include columns.  This can affect the size of the index and cause more I/O.  There will be another blog that explains this in depth and provides a query to identify duplicate indexes with similar includes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The query to identify exact duplicates:&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;codebox&quot;&gt;&lt;div class=&quot;codeheader&quot;&gt;Code: &lt;span&gt;tsql&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;codeholder&quot;&gt;&lt;div class=&quot;tsql&quot; id=&quot;cb72635&quot; style=&quot;display: block; color: rgb(0, 0, 0);&quot;&gt;; &lt;span style=&quot;color: #0000FF;&quot;&gt;With&lt;/span&gt; IndexColumns &lt;span style=&quot;color: #0000FF;&quot;&gt;As&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;select&lt;/span&gt;&amp;nbsp; I.&lt;span style=&quot;color: #FF00FF;&quot;&gt;object_id&lt;/span&gt;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I.&lt;span style=&quot;color: #202020;&quot;&gt;index_id&lt;/span&gt;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #FF00FF;&quot;&gt;SubString&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;select&lt;/span&gt;&amp;nbsp; &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;,&#039;&lt;/span&gt; + &lt;span style=&quot;color: #FF00FF;&quot;&gt;Convert&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;VarChar&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;, Column_id&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;from&lt;/span&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #00AF00;&quot;&gt;sys&lt;/span&gt;.&lt;span style=&quot;color: #00AF00;&quot;&gt;index_columns&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;as&lt;/span&gt; k&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;where&lt;/span&gt;&amp;nbsp; &amp;nbsp;k.&lt;span style=&quot;color: #FF00FF;&quot;&gt;object_id&lt;/span&gt; = i.&lt;span style=&quot;color: #FF00FF;&quot;&gt;object_id&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; and k.&lt;span style=&quot;color: #202020;&quot;&gt;index_id&lt;/span&gt; = i.&lt;span style=&quot;color: #202020;&quot;&gt;index_id&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; and is_included_column = &lt;span style=&quot;color: #000;&quot;&gt;0&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;Order&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;By&lt;/span&gt; key_ordinal&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;xml&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span style=&quot;color: #000;&quot;&gt;2&lt;/span&gt;, &lt;span style=&quot;color: #000;&quot;&gt;1000&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;As&lt;/span&gt; KeyColumns,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #FF00FF;&quot;&gt;SubString&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;Coalesce&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;select&lt;/span&gt;&amp;nbsp; &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;,&#039;&lt;/span&gt; + &lt;span style=&quot;color: #FF00FF;&quot;&gt;Convert&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;VarChar&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;, Column_id&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;from&lt;/span&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #00AF00;&quot;&gt;sys&lt;/span&gt;.&lt;span style=&quot;color: #00AF00;&quot;&gt;index_columns&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;as&lt;/span&gt; k&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;where&lt;/span&gt;&amp;nbsp; &amp;nbsp;k.&lt;span style=&quot;color: #FF00FF;&quot;&gt;object_id&lt;/span&gt; = i.&lt;span style=&quot;color: #FF00FF;&quot;&gt;object_id&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; and k.&lt;span style=&quot;color: #202020;&quot;&gt;index_id&lt;/span&gt; = i.&lt;span style=&quot;color: #202020;&quot;&gt;index_id&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; and is_included_column = &lt;span style=&quot;color: #000;&quot;&gt;1&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;Order&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;By&lt;/span&gt; column_id&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;xml&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span style=&quot;color: #000;&quot;&gt;2&lt;/span&gt;, &lt;span style=&quot;color: #000;&quot;&gt;1000&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;As&lt;/span&gt; IncludeColumns&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;From&lt;/span&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #00AF00;&quot;&gt;sys&lt;/span&gt;.&lt;span style=&quot;color: #00AF00;&quot;&gt;indexes&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;As&lt;/span&gt; I&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;Inner&lt;/span&gt; Join &lt;span style=&quot;color: #00AF00;&quot;&gt;sys&lt;/span&gt;.&lt;span style=&quot;color: #00AF00;&quot;&gt;Tables&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;As&lt;/span&gt; T&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;On&lt;/span&gt; I.&lt;span style=&quot;color: #FF00FF;&quot;&gt;object_id&lt;/span&gt; = T.&lt;span style=&quot;color: #FF00FF;&quot;&gt;object_id&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;Where&lt;/span&gt;&amp;nbsp; &amp;nbsp;I.&lt;span style=&quot;color: #202020;&quot;&gt;type_desc&lt;/span&gt; &amp;lt;&amp;gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;Clustered&#039;&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; And T.&lt;span style=&quot;color: #202020;&quot;&gt;is_ms_shipped&lt;/span&gt; = &lt;span style=&quot;color: #000;&quot;&gt;0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Select&lt;/span&gt; &amp;nbsp;&lt;span style=&quot;color: #FF00FF;&quot;&gt;Object_Name&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;AIndex.&lt;span style=&quot;color: #FF00FF;&quot;&gt;object_id&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;As&lt;/span&gt; TableName,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AIndex.&lt;span style=&quot;color: #202020;&quot;&gt;name&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;As&lt;/span&gt; Index1,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bIndex.&lt;span style=&quot;color: #202020;&quot;&gt;Name&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;As&lt;/span&gt; Index2,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;Drop Index [&#039;&lt;/span&gt; + bIndex.&lt;span style=&quot;color: #202020;&quot;&gt;Name&lt;/span&gt; + &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;] On [&#039;&lt;/span&gt; + &lt;span style=&quot;color: #FF00FF;&quot;&gt;Object_Name&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;AIndex.&lt;span style=&quot;color: #FF00FF;&quot;&gt;object_id&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt; + &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;]&#039;&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;As&lt;/span&gt; DropCode&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;From&lt;/span&gt;&amp;nbsp; &amp;nbsp; IndexColumns &lt;span style=&quot;color: #0000FF;&quot;&gt;As&lt;/span&gt; A&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;Inner&lt;/span&gt; Join IndexColumns &amp;nbsp;&lt;span style=&quot;color: #0000FF;&quot;&gt;As&lt;/span&gt; B&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;On&lt;/span&gt; A.&lt;span style=&quot;color: #FF00FF;&quot;&gt;object_id&lt;/span&gt; = B.&lt;span style=&quot;color: #FF00FF;&quot;&gt;object_id&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; And A.&lt;span style=&quot;color: #202020;&quot;&gt;index_id&lt;/span&gt; &amp;lt; B.&lt;span style=&quot;color: #202020;&quot;&gt;index_id&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; And A.&lt;span style=&quot;color: #202020;&quot;&gt;KeyColumns&lt;/span&gt; = B.&lt;span style=&quot;color: #202020;&quot;&gt;KeyColumns&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; And A.&lt;span style=&quot;color: #202020;&quot;&gt;IncludeColumns&lt;/span&gt; = B.&lt;span style=&quot;color: #202020;&quot;&gt;IncludeColumns&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;Inner&lt;/span&gt; Join &lt;span style=&quot;color: #00AF00;&quot;&gt;sys&lt;/span&gt;.&lt;span style=&quot;color: #00AF00;&quot;&gt;indexes&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;As&lt;/span&gt; AIndex&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;On&lt;/span&gt; A.&lt;span style=&quot;color: #FF00FF;&quot;&gt;object_id&lt;/span&gt; = AIndex.&lt;span style=&quot;color: #FF00FF;&quot;&gt;object_id&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; And A.&lt;span style=&quot;color: #202020;&quot;&gt;index_id&lt;/span&gt; = AIndex.&lt;span style=&quot;color: #202020;&quot;&gt;index_id&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;Inner&lt;/span&gt; Join &lt;span style=&quot;color: #00AF00;&quot;&gt;sys&lt;/span&gt;.&lt;span style=&quot;color: #00AF00;&quot;&gt;indexes&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;As&lt;/span&gt; BIndex&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;On&lt;/span&gt; B.&lt;span style=&quot;color: #FF00FF;&quot;&gt;object_id&lt;/span&gt; = BIndex.&lt;span style=&quot;color: #FF00FF;&quot;&gt;object_id&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; And B.&lt;span style=&quot;color: #202020;&quot;&gt;index_id&lt;/span&gt; = BIndex.&lt;span style=&quot;color: #202020;&quot;&gt;index_id&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;cb94209&quot; style=&quot;display: none; color: red;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When you run this query, you will see two columns in the output showing you the duplicates.  Since these are exact duplicates, you can drop one of them.  Which one you drop is up to you.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/finding-exact-duplicate-indexes&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://lessthandot.com/&quot;&gt;LessThanDot&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>This blog is not meant to be a comprehensive explanation of indexes.  It is meant to help you determine if there are duplicate indexes within your database.  There appears to be some debate regarding what is a duplicate index.  This article defines an &#8220;Exact Duplicate Index&#8221; where there are multiple non-clustered indexes with exactly the same keys and include columns.</p>

<p><strong>This query will ignore clustered indexes.</strong><br />
It is possible to create a non-clustered index with keys that match a clustered index.  Sometimes, this could be considered a duplicate index, and sometimes it should not be considered a duplicate.  For example, suppose you have a wide table so that there is only one row per data page.  Also suppose you have a query that only needs to use the key columns.  It will be faster to use a non-clustered index for the query instead of the clustered index because the non-clustered index would only include the key columns, and you will get more columns per data page.  The non-clustered index would require less file I/O, and therefore increased performance.</p>

<p>If you have a wide table with many rows, a non-clustered index that matches the key columns of the clustered index will improve performance.</p>

<p><strong>This query will ignore partial duplicates with similar keys.</strong><br />
It is possible to create indexes with similar keys, and sometimes it is beneficial to do so.  For example, suppose you had an index with key columns (Col1, Col2) and another with (Col1, Col2, Col3).  You probably don&#8217;t need the first index because the second index will suffice.  However, there are cases where Col3 could be wide and using it would cause extra I/O compared to the first index.  It is probably rare that you would see any difference in performance between these indexes.  I will be writing another article that explains this in depth and provides a query that will return these possible duplicates.</p>

<p><strong>This query will ignore partial duplicates with the same keys and similar includes.</strong><br />
Column ordering for include columns does not matter, but which columns are included can make a big difference in the performance of a query.  There could be similar indexes that have the same key columns but different include columns.  This can affect the size of the index and cause more I/O.  There will be another blog that explains this in depth and provides a query to identify duplicate indexes with similar includes.</p>

<p><strong>The query to identify exact duplicates:</strong></p>

<div class="codebox"><div class="codeheader"><span>tsql</span><div class="codebox_javascript_links"><a href="http://blogs.lessthandot.com" onclick="linenumberOnOff('cb63473'); return false;">Line number Off</a> | <a href="http://blogs.lessthandot.com#" onclick="expandCode('cb63473','cb91064'); return false;">Hide</a> | <a href="http://blogs.lessthandot.com#" onclick="selectCode(this); return false;">Select all</a></div></div><!-- we need this dummy div to fix a firefox bug when selecting code lines --><div class="codeholder"><div class="tsql" id="cb63473" style="display: block; color: rgb(0, 0, 0);"><ol><li style="" class="li1">; <span style="color: #0000FF;">With</span> IndexColumns <span style="color: #0000FF;">As</span></li><li style="" class="li2"><span style="color: #808080;">&#40;</span></li><li style="" class="li1">&nbsp; &nbsp; <span style="color: #0000FF;">select</span>&nbsp; I.<span style="color: #FF00FF;">object_id</span>,</li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; I.<span style="color: #202020;">index_id</span>,</li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF00FF;">SubString</span><span style="color: #808080;">&#40;</span></li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">&#40;</span></li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">select</span>&nbsp; <span style="color: #FF0000;">','</span> + <span style="color: #FF00FF;">Convert</span><span style="color: #808080;">&#40;</span><span style="color: #0000FF;">VarChar</span><span style="color: #808080;">&#40;</span><span style="color: #000;">10</span><span style="color: #808080;">&#41;</span>, Column_id<span style="color: #808080;">&#41;</span></li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">from</span>&nbsp; &nbsp; <span style="color: #00AF00;">sys</span>.<span style="color: #00AF00;">index_columns</span> <span style="color: #0000FF;">as</span> k</li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">where</span>&nbsp; &nbsp;k.<span style="color: #FF00FF;">object_id</span> = i.<span style="color: #FF00FF;">object_id</span></li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and k.<span style="color: #202020;">index_id</span> = i.<span style="color: #202020;">index_id</span></li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and is_included_column = <span style="color: #000;">0</span></li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">Order</span> <span style="color: #0000FF;">By</span> key_ordinal</li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">for</span> <span style="color: #0000FF;">xml</span> <span style="color: #0000FF;">path</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">''</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">&#41;</span>, <span style="color: #000;">2</span>, <span style="color: #000;">1000</span><span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">As</span> KeyColumns,</li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF00FF;">SubString</span><span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">Coalesce</span><span style="color: #808080;">&#40;</span></li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">&#40;</span></li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">select</span>&nbsp; <span style="color: #FF0000;">','</span> + <span style="color: #FF00FF;">Convert</span><span style="color: #808080;">&#40;</span><span style="color: #0000FF;">VarChar</span><span style="color: #808080;">&#40;</span><span style="color: #000;">10</span><span style="color: #808080;">&#41;</span>, Column_id<span style="color: #808080;">&#41;</span></li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">from</span>&nbsp; &nbsp; <span style="color: #00AF00;">sys</span>.<span style="color: #00AF00;">index_columns</span> <span style="color: #0000FF;">as</span> k</li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">where</span>&nbsp; &nbsp;k.<span style="color: #FF00FF;">object_id</span> = i.<span style="color: #FF00FF;">object_id</span></li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and k.<span style="color: #202020;">index_id</span> = i.<span style="color: #202020;">index_id</span></li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and is_included_column = <span style="color: #000;">1</span></li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">Order</span> <span style="color: #0000FF;">By</span> column_id</li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">for</span> <span style="color: #0000FF;">xml</span> <span style="color: #0000FF;">path</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">''</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">&#41;</span>, <span style="color: #FF0000;">''</span><span style="color: #808080;">&#41;</span>, <span style="color: #000;">2</span>, <span style="color: #000;">1000</span><span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">As</span> IncludeColumns</li><li style="" class="li1">&nbsp; &nbsp; <span style="color: #0000FF;">From</span>&nbsp; &nbsp; <span style="color: #00AF00;">sys</span>.<span style="color: #00AF00;">indexes</span> <span style="color: #0000FF;">As</span> I</li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">Inner</span> Join <span style="color: #00AF00;">sys</span>.<span style="color: #00AF00;">Tables</span> <span style="color: #0000FF;">As</span> T</li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">On</span> I.<span style="color: #FF00FF;">object_id</span> = T.<span style="color: #FF00FF;">object_id</span></li><li style="" class="li2">&nbsp; &nbsp; <span style="color: #0000FF;">Where</span>&nbsp; &nbsp;I.<span style="color: #202020;">type_desc</span> &lt;&gt; <span style="color: #FF0000;">'Clustered'</span></li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; And T.<span style="color: #202020;">is_ms_shipped</span> = <span style="color: #000;">0</span></li><li style="" class="li2"><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Select</span> &nbsp;<span style="color: #FF00FF;">Object_Name</span><span style="color: #808080;">&#40;</span>AIndex.<span style="color: #FF00FF;">object_id</span><span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">As</span> TableName,</li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; AIndex.<span style="color: #202020;">name</span> <span style="color: #0000FF;">As</span> Index1,</li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; bIndex.<span style="color: #202020;">Name</span> <span style="color: #0000FF;">As</span> Index2,</li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF0000;">'Drop Index ['</span> + bIndex.<span style="color: #202020;">Name</span> + <span style="color: #FF0000;">'] On ['</span> + <span style="color: #FF00FF;">Object_Name</span><span style="color: #808080;">&#40;</span>AIndex.<span style="color: #FF00FF;">object_id</span><span style="color: #808080;">&#41;</span> + <span style="color: #FF0000;">']'</span> <span style="color: #0000FF;">As</span> DropCode</li><li style="" class="li1"><span style="color: #0000FF;">From</span>&nbsp; &nbsp; IndexColumns <span style="color: #0000FF;">As</span> A</li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">Inner</span> Join IndexColumns &nbsp;<span style="color: #0000FF;">As</span> B</li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">On</span> A.<span style="color: #FF00FF;">object_id</span> = B.<span style="color: #FF00FF;">object_id</span></li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; And A.<span style="color: #202020;">index_id</span> &lt; B.<span style="color: #202020;">index_id</span></li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; And A.<span style="color: #202020;">KeyColumns</span> = B.<span style="color: #202020;">KeyColumns</span></li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; And A.<span style="color: #202020;">IncludeColumns</span> = B.<span style="color: #202020;">IncludeColumns</span></li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">Inner</span> Join <span style="color: #00AF00;">sys</span>.<span style="color: #00AF00;">indexes</span> <span style="color: #0000FF;">As</span> AIndex</li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">On</span> A.<span style="color: #FF00FF;">object_id</span> = AIndex.<span style="color: #FF00FF;">object_id</span></li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; And A.<span style="color: #202020;">index_id</span> = AIndex.<span style="color: #202020;">index_id</span></li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">Inner</span> Join <span style="color: #00AF00;">sys</span>.<span style="color: #00AF00;">indexes</span> <span style="color: #0000FF;">As</span> BIndex</li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">On</span> B.<span style="color: #FF00FF;">object_id</span> = BIndex.<span style="color: #FF00FF;">object_id</span></li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; And B.<span style="color: #202020;">index_id</span> = BIndex.<span style="color: #202020;">index_id</span></li></ol></div><div id="cb91064" style="display: none; color: red;"></div></div></div>

<p>When you run this query, you will see two columns in the output showing you the duplicates.  Since these are exact duplicates, you can drop one of them.  Which one you drop is up to you.</p><div class="item_footer"><p><small><a href="http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/finding-exact-duplicate-indexes">Original post</a> blogged on <a href="http://lessthandot.com/">LessThanDot</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/finding-exact-duplicate-indexes#comments</comments>
			<wfw:commentRss>http://blogs.lessthandot.com/index.php/DataMgmt/?tempskin=_rss2&#38;disp=comments&#38;p=1700</wfw:commentRss>
		</item>
				<item>
			<title>Do not use reserved keywords for your column names</title>
			<link>http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/do-not-use-reserved-keywords</link>
			<pubDate>Mon, 19 Mar 2012 16:16:00 +0000</pubDate>			<dc:creator>George Mastros (gmmastros)</dc:creator>
			<category domain="main">Data Modelling &amp; Design</category>			<guid isPermaLink="false">1670@http://blogs.lessthandot.com/</guid>
						<description>&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/do-not-use-reserved-keywords&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://lessthandot.com/&quot;&gt;LessThanDot&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Column names and table names should not use reserved keywords in your database. You can use reserved keywords because SQL Server will allow it.  However, this should not be done because it makes writing and reading queries more difficult. When you use a reserved keyword for a column or table name, you need to use [square brackets] around the name.</p>

<p>The following query compares your column names against a list of <a href="http://msdn.microsoft.com/en-us/library/aa238507(v=sql.80).aspx">identified keywords</a>. Some of the keywords are SQL Server reserved words, some are ODBC reserved words, and the rest are future reserved words.</p>

<p><strong>How to detect this problem:</strong></p>
<div class="codebox"><div class="codeheader"><span>tsql</span><div class="codebox_javascript_links"><a href="http://blogs.lessthandot.com" onclick="linenumberOnOff('cb86351'); return false;">Line number Off</a> | <a href="http://blogs.lessthandot.com#" onclick="expandCode('cb86351','cb78997'); return false;">Hide</a> | <a href="http://blogs.lessthandot.com#" onclick="selectCode(this); return false;">Select all</a></div></div><!-- we need this dummy div to fix a firefox bug when selecting code lines --><div class="codeholder"><div class="tsql" id="cb86351" style="display: block; color: rgb(0, 0, 0);"><ol><li style="" class="li1"><span style="color: #0000FF;">Declare</span> @Temp <span style="color: #0000FF;">Table</span><span style="color: #808080;">&#40;</span><span style="color: #0000FF;">Data</span> <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></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ABSOLUTE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ACTION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ADA'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ADD'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ADMIN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'AFTER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'AGGREGATE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ALIAS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ALL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ALLOCATE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ALTER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'AND'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ANY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ARE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ARRAY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'AS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ASC'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ASSERTION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'AT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'AUTHORIZATION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'AVG'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'BACKUP'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'BEFORE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'BEGIN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'BETWEEN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'BINARY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'BIT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'BIT_LENGTH'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'BLOB'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'BOOLEAN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'BOTH'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'BREADTH'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'BREAK'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'BROWSE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'BULK'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'BY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CALL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CASCADE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CASCADED'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CASE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CAST'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CATALOG'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CHAR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CHAR_LENGTH'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CHARACTER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CHARACTER_LENGTH'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CHECK'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CHECKPOINT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CLASS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CLOB'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CLOSE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CLUSTERED'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'COALESCE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'COLLATE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'COLLATION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'COLUMN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'COMMIT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'COMPLETION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'COMPUTE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CONNECT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CONNECTION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CONSTRAINT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CONSTRAINTS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CONSTRUCTOR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CONTAINS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CONTAINSTABLE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CONTINUE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CONVERT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CORRESPONDING'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'COUNT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CREATE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CROSS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CUBE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CURRENT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CURRENT_DATE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CURRENT_PATH'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CURRENT_ROLE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CURRENT_TIME'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CURRENT_TIMESTAMP'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CURRENT_USER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CURSOR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'CYCLE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DATA'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DATABASE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DATE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DAY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DBCC'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DEALLOCATE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DEC'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DECIMAL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DECLARE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DEFAULT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DEFERRABLE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DEFERRED'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DELETE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DENY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DEPTH'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DEREF'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DESC'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DESCRIBE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DESCRIPTOR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DESTROY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DESTRUCTOR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DETERMINISTIC'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DIAGNOSTICS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DICTIONARY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DISCONNECT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DISK'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DISTINCT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DISTRIBUTED'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DOMAIN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DOUBLE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DROP'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DUMMY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DUMP'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'DYNAMIC'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'EACH'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ELSE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'END'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'END-EXEC'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'EQUALS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ERRLVL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ESCAPE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'EVERY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'EXCEPT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'EXCEPTION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'EXEC'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'EXECUTE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'EXISTS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'EXIT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'EXTERNAL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'EXTRACT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'FALSE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'FETCH'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'FILE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'FILLFACTOR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'FIRST'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'FLOAT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'FOR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'FOREIGN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'FORTRAN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'FOUND'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'FREE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'FREETEXT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'FREETEXTTABLE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'FROM'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'FULL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'FUNCTION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'GENERAL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'GET'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'GLOBAL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'GO'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'GOTO'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'GRANT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'GROUP'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'GROUPING'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'HAVING'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'HOLDLOCK'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'HOST'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'HOUR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'IDENTITY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'IDENTITY_INSERT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'IDENTITYCOL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'IF'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'IGNORE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'IMMEDIATE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'IN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'INCLUDE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'INDEX'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'INDICATOR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'INITIALIZE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'INITIALLY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'INNER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'INOUT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'INPUT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'INSENSITIVE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'INSERT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'INT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'INTEGER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'INTERSECT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'INTERVAL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'INTO'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'IS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ISOLATION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ITERATE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'JOIN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'KEY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'KILL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'LANGUAGE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'LARGE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'LAST'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'LATERAL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'LEADING'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'LEFT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'LESS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'LEVEL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'LIKE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'LIMIT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'LINENO'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'LOAD'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'LOCAL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'LOCALTIME'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'LOCALTIMESTAMP'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'LOCATOR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'LOWER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'MAP'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'MATCH'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'MAX'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'MIN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'MINUTE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'MODIFIES'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'MODIFY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'MODULE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'MONTH'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'NAMES'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'NATIONAL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'NATURAL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'NCHAR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'NCLOB'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'NEW'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'NEXT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'NO'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'NOCHECK'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'NONCLUSTERED'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'NONE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'NOT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'NULL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'NULLIF'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'NUMERIC'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OBJECT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OCTET_LENGTH'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OF'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OFF'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OFFSETS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OLD'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ON'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ONLY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OPEN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OPENDATASOURCE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OPENQUERY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OPENROWSET'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OPENXML'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OPERATION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OPTION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ORDER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ORDINALITY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OUT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OUTER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OUTPUT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OVER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'OVERLAPS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PAD'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PARAMETER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PARAMETERS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PARTIAL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PASCAL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PATH'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PERCENT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PLAN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'POSITION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'POSTFIX'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PRECISION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PREFIX'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PREORDER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PREPARE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PRESERVE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PRIMARY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PRINT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PRIOR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PRIVILEGES'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PROC'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PROCEDURE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'PUBLIC'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'RAISERROR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'READ'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'READS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'READTEXT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'REAL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'RECONFIGURE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'RECURSIVE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'REF'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'REFERENCES'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'REFERENCING'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'RELATIVE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'REPLICATION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'RESTORE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'RESTRICT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'RESULT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'RETURN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'RETURNS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'REVOKE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'RIGHT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ROLE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ROLLBACK'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ROLLUP'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ROUTINE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ROW'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ROWCOUNT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ROWGUIDCOL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ROWS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'RULE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SAVE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SAVEPOINT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SCHEMA'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SCOPE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SCROLL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SEARCH'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SECOND'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SECTION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SELECT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SEQUENCE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SESSION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SESSION_USER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SET'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SETS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SETUSER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SHUTDOWN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SIZE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SMALLINT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SOME'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SPACE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SPECIFIC'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SPECIFICTYPE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SQL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SQLCA'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SQLCODE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SQLERROR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SQLEXCEPTION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SQLSTATE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SQLWARNING'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'START'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'STATE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'STATEMENT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'STATIC'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'STATISTICS'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'STRUCTURE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SUBSTRING'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SUM'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'SYSTEM_USER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TABLE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TEMPORARY'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TERMINATE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TEXTSIZE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'THAN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'THEN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TIME'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TIMESTAMP'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TIMEZONE_HOUR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TIMEZONE_MINUTE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TO'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TOP'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TRAILING'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TRAN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TRANSACTION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TRANSLATE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TRANSLATION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TREAT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TRIGGER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TRIM'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TRUE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TRUNCATE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'TSEQUAL'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'UNDER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'UNION'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'UNIQUE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'UNKNOWN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'UNNEST'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'UPDATE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'UPDATETEXT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'UPPER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'USAGE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'USE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'USER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'USING'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'VALUE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'VALUES'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'VARCHAR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'VARIABLE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'VARYING'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'VIEW'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'WAITFOR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'WHEN'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'WHENEVER'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'WHERE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'WHILE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'WITH'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'WITHOUT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'WORK'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'WRITE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'WRITETEXT'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'YEAR'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> @Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'ZONE'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1">&nbsp;</li><li style="" class="li2"><span style="color: #0000FF;">Select</span>&nbsp; <span style="color: #FF00FF;">object_name</span><span style="color: #808080;">&#40;</span>C.<span style="color: #FF00FF;">object_id</span><span style="color: #808080;">&#41;</span>, C.<span style="color: #202020;">Name</span></li><li style="" class="li1"><span style="color: #0000FF;">From</span>&nbsp; &nbsp; <span style="color: #00AF00;">sys</span>.<span style="color: #00AF00;">columns</span> <span style="color: #0000FF;">As</span> C</li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">Inner</span> Join <span style="color: #00AF00;">sys</span>.<span style="color: #00AF00;">objects</span> <span style="color: #0000FF;">As</span> O</li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">On</span> C.<span style="color: #FF00FF;">object_id</span> = O.<span style="color: #FF00FF;">object_id</span></li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">Inner</span> Join @Temp T</li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">On</span> C.<span style="color: #202020;">Name</span> = <span style="color: #0000FF;">Data</span></li><li style="" class="li2"><span style="color: #0000FF;">Where</span>&nbsp; &nbsp;is_ms_shipped = <span style="color: #000;">0</span></li><li style="" class="li1"><span style="color: #0000FF;">Order</span> <span style="color: #0000FF;">By</span> <span style="color: #FF00FF;">object_name</span><span style="color: #808080;">&#40;</span>C.<span style="color: #FF00FF;">object_id</span><span style="color: #808080;">&#41;</span>, C.<span style="color: #202020;">Name</span></li></ol></div><div id="cb78997" style="display: none; color: red;"></div></div></div>

<p><strong>How to correct it:</strong><br />
Correcting for this type of problem can be challenging because you cannot just willy nilly go around changing column names.  You are likely to have code that uses the column with the original name and this code will need to change to accommodate the changed column name.  To make matters more difficult, you could have systems outside of the database that are sending dynamic SQL making it more difficult to find all of the occurrences in code.</p><div class="item_footer"><p><small><a href="http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/do-not-use-reserved-keywords">Original post</a> blogged on <a href="http://lessthandot.com/">LessThanDot</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/do-not-use-reserved-keywords#comments</comments>
			<wfw:commentRss>http://blogs.lessthandot.com/index.php/DataMgmt/?tempskin=_rss2&#38;disp=comments&#38;p=1670</wfw:commentRss>
		</item>
				<item>
			<title>Friday SQL Nugget #1</title>
			<link>http://blogs.lessthandot.com/index.php/ITProfessionals/EthicsIT/friday-sql-nugget-3</link>
			<pubDate>Fri, 13 Jan 2012 17:28:00 +0000</pubDate>			<dc:creator>George Mastros (gmmastros)</dc:creator>
			<category domain="main">Ethics &amp; IT</category>			<guid isPermaLink="false">1594@http://blogs.lessthandot.com/</guid>
						<description>&lt;p&gt;Ted Krueger tagged me &lt;a href=&quot;http://blogs.lessthandot.com/index.php/ITProfessionals/ProfessionalDevelopment/friday-sql-nugget-1&quot;&gt;&quot;Deciding I need to delete it all and start over again&quot;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;What can I say, during the process of writing this post, I expect to delete it all and start over again at least once!&lt;/p&gt;

&lt;p&gt;I suspect that most people would think that &quot;starting over&quot; is generally bad.  I couldn&#039;t disagree more.  Every time I have started over, I always end up with code that is easier to read, more efficient and ultimately has less bugs.&lt;/p&gt;

&lt;p&gt;My wife and I own a software company named &lt;a href=&quot;http://orbitsoftware.net&quot;&gt;Orbit Software&lt;/a&gt;. We have a product that &lt;a href=&quot;http://busboss.com&quot;&gt;optimizes school bus routes&lt;/a&gt;. I started writing this product 14 years ago, and I am constantly amazed that there continues to be more features that ultimately enhance this product.  During the 14 years, we have released 10 versions of this product.  Each version has many more features than the previous version.  What&#039;s interesting to me is that each version has shown an increase in performance, and that increase is NOT due to better hardware.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How did I accomplish this?  By starting over!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I&#039;m not suggesting that each version was completely re-written.  That would be insane.  However, each version has large portions of it that have been re-written.  There is a constant struggle between writing &quot;perfect code&quot; and actually delivering a product that is useful to your customers.  If we had waited until the code was perfect, we would still be working on version 1.&lt;/p&gt;

&lt;p&gt;My approach to software development has always been, &quot;Make it work, then make it fast&quot;.  Sometimes there isn&#039;t enough time for the second part, so it has to wait for another version. I don&#039;t think there is a single line of code in the most recent version that existed in the first. &lt;/p&gt;

&lt;p&gt;Every developer has a different tipping point where they decide that starting over is the best course of action.  I encourage everyone to give some thought about their own tipping point. Starting over with a block of code is something that should be encouraged, not avoided.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.lessthandot.com/index.php/ITProfessionals/EthicsIT/friday-sql-nugget-3&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://lessthandot.com/&quot;&gt;LessThanDot&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Ted Krueger tagged me <a href="http://blogs.lessthandot.com/index.php/ITProfessionals/ProfessionalDevelopment/friday-sql-nugget-1">"Deciding I need to delete it all and start over again"</a>.</p>

<p>What can I say, during the process of writing this post, I expect to delete it all and start over again at least once!</p>

<p>I suspect that most people would think that "starting over" is generally bad.  I couldn't disagree more.  Every time I have started over, I always end up with code that is easier to read, more efficient and ultimately has less bugs.</p>

<p>My wife and I own a software company named <a href="http://orbitsoftware.net">Orbit Software</a>. We have a product that <a href="http://busboss.com">optimizes school bus routes</a>. I started writing this product 14 years ago, and I am constantly amazed that there continues to be more features that ultimately enhance this product.  During the 14 years, we have released 10 versions of this product.  Each version has many more features than the previous version.  What's interesting to me is that each version has shown an increase in performance, and that increase is NOT due to better hardware.</p>

<p><strong>How did I accomplish this?  By starting over!</strong></p>

<p>I'm not suggesting that each version was completely re-written.  That would be insane.  However, each version has large portions of it that have been re-written.  There is a constant struggle between writing "perfect code" and actually delivering a product that is useful to your customers.  If we had waited until the code was perfect, we would still be working on version 1.</p>

<p>My approach to software development has always been, "Make it work, then make it fast".  Sometimes there isn't enough time for the second part, so it has to wait for another version. I don't think there is a single line of code in the most recent version that existed in the first. </p>

<p>Every developer has a different tipping point where they decide that starting over is the best course of action.  I encourage everyone to give some thought about their own tipping point. Starting over with a block of code is something that should be encouraged, not avoided.</p><div class="item_footer"><p><small><a href="http://blogs.lessthandot.com/index.php/ITProfessionals/EthicsIT/friday-sql-nugget-3">Original post</a> blogged on <a href="http://lessthandot.com/">LessThanDot</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.lessthandot.com/index.php/ITProfessionals/EthicsIT/friday-sql-nugget-3#comments</comments>
			<wfw:commentRss>http://blogs.lessthandot.com/index.php/ITProfessionals/?tempskin=_rss2&#38;disp=comments&#38;p=1594</wfw:commentRss>
		</item>
				<item>
			<title>SQLCop integration with Red Gate's SQL Test</title>
			<link>http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/sqlcop-integration-with-red-gate</link>
			<pubDate>Wed, 04 Jan 2012 18:52:00 +0000</pubDate>			<dc:creator>George Mastros (gmmastros)</dc:creator>
			<category domain="main">Data Modelling &amp; Design</category>
<category domain="alt">Database Programming</category>
<category domain="alt">Database Administration</category>
<category domain="alt">Microsoft SQL Server Admin</category>
<category domain="alt">Microsoft SQL Server</category>			<guid isPermaLink="false">1580@http://blogs.lessthandot.com/</guid>
						<description>&lt;p&gt;Approximately a year and a half ago, friends of mine and I created SQLCop.  Our motivation was to provide a tool that users can download and run against their database.  This tool is very effective at detecting common problems with database configurations and TSQL code.  Not every issue highlighted by SQLCop requires a fix, but you are very likely to discover potential problems that you didn&#039;t even know you had.&lt;/p&gt;

&lt;p&gt;About a year ago, I met Dennis Lloyd, Jr. and Sebastian Meine at a presentation they were giving for tSQLt (&lt;a href=&quot;http://tSQLt.org&quot;&gt;a unit testing framework for SQL Server&lt;/a&gt;) that they were working on.  I was intrigued because I had always wanted to write unit tests for my tSQL code but hadn&amp;#8217;t been able to implement anything because of time constraints on my end.  The tSQLt framework allowed me to forget about the mechanics of implementing and running the tests and allowed me to focus on writing the tests.&lt;/p&gt;

&lt;p&gt;Several weeks ago, I was approached by Justin Caldicott at Red Gate Software.  He informed that they had recently released SQL Test which is a SSMS add-in that makes writing and executing tSQLt tests easier.  &lt;/p&gt;

&lt;p&gt;Justin was interested in including SQLCop tests within SQL Test.  I downloaded and installed SQLTest.  I was surprised to see that it recognized all of the tests that I had written manually.  I also like how easy it is to run tests and create new ones.  This tool has already saved me time.&lt;/p&gt;

&lt;p&gt;I spent a relatively short amount of time re-writing a couple of the SQLCop tests to run within the tSQLt framework.  At this point, there are several tests already written and included with SQL Test (Preview 2).  &lt;/p&gt;

&lt;p&gt;If you haven&#039;t done so already, I encourage you to download and install &lt;a href=&quot;http://sqlcop.lessthandot.com&quot;&gt;SQLCop&lt;/a&gt;.  I would be extremely surprised if you didn&amp;#8217;t find something useful with it.&lt;/p&gt;

&lt;p&gt;I also encourage everyone to download and install &lt;a href=&quot;http://www.red-gate.com/products/sql-development/sql-test/&quot;&gt;SQL Test&lt;/a&gt; so that you can see for yourself how easy it is to run unit tests on your database.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/sqlcop-integration-with-red-gate&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://lessthandot.com/&quot;&gt;LessThanDot&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Approximately a year and a half ago, friends of mine and I created SQLCop.  Our motivation was to provide a tool that users can download and run against their database.  This tool is very effective at detecting common problems with database configurations and TSQL code.  Not every issue highlighted by SQLCop requires a fix, but you are very likely to discover potential problems that you didn't even know you had.</p>

<p>About a year ago, I met Dennis Lloyd, Jr. and Sebastian Meine at a presentation they were giving for tSQLt (<a href="http://tSQLt.org">a unit testing framework for SQL Server</a>) that they were working on.  I was intrigued because I had always wanted to write unit tests for my tSQL code but hadn&#8217;t been able to implement anything because of time constraints on my end.  The tSQLt framework allowed me to forget about the mechanics of implementing and running the tests and allowed me to focus on writing the tests.</p>

<p>Several weeks ago, I was approached by Justin Caldicott at Red Gate Software.  He informed that they had recently released SQL Test which is a SSMS add-in that makes writing and executing tSQLt tests easier.  </p>

<p>Justin was interested in including SQLCop tests within SQL Test.  I downloaded and installed SQLTest.  I was surprised to see that it recognized all of the tests that I had written manually.  I also like how easy it is to run tests and create new ones.  This tool has already saved me time.</p>

<p>I spent a relatively short amount of time re-writing a couple of the SQLCop tests to run within the tSQLt framework.  At this point, there are several tests already written and included with SQL Test (Preview 2).  </p>

<p>If you haven't done so already, I encourage you to download and install <a href="http://sqlcop.lessthandot.com">SQLCop</a>.  I would be extremely surprised if you didn&#8217;t find something useful with it.</p>

<p>I also encourage everyone to download and install <a href="http://www.red-gate.com/products/sql-development/sql-test/">SQL Test</a> so that you can see for yourself how easy it is to run unit tests on your database.</p><div class="item_footer"><p><small><a href="http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/sqlcop-integration-with-red-gate">Original post</a> blogged on <a href="http://lessthandot.com/">LessThanDot</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/sqlcop-integration-with-red-gate#comments</comments>
			<wfw:commentRss>http://blogs.lessthandot.com/index.php/DataMgmt/?tempskin=_rss2&#38;disp=comments&#38;p=1580</wfw:commentRss>
		</item>
				<item>
			<title>Zero-One-Some Testing</title>
			<link>http://blogs.lessthandot.com/index.php/DataMgmt/DBProgramming/zero-one-some-testing</link>
			<pubDate>Tue, 13 Dec 2011 11:33:00 +0000</pubDate>			<dc:creator>George Mastros (gmmastros)</dc:creator>
			<category domain="alt">Data Modelling &amp; Design</category>
<category domain="main">Database Programming</category>
<category domain="alt">Microsoft SQL Server</category>			<guid isPermaLink="false">1540@http://blogs.lessthandot.com/</guid>
						<description>&lt;p&gt;&lt;em&gt;I met Denis and Sebastian over a year ago when I attended their session on test driven database development.  Since then, I have been using tSQLt to add unit tests to my database.  The following post was written by Denis Lloyd Jr.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;About the Series&lt;/h2&gt;
&lt;p&gt;Test case heuristics are patterns used to help decide the next test to write and ensure test coverage of requirements. This is the second post on a series of test case heuristics pertaining to database testing.&lt;/p&gt;

&lt;p&gt;I&#039;m trying out a new way of delivering series to a wider audience - post sharing! The series home is at: &lt;a href=&quot;http://testdrivendatabases.com/test-heuristics&quot;&gt;http://testdrivendatabases.com/test-heuristics&lt;/a&gt; where you can find links to all articles in the series. The posts will be scattered over a variety of websites and blogs.&lt;/p&gt;

&lt;h2&gt;Definition:&lt;/h2&gt;
&lt;p&gt;Zero-One-Some says that if multiple instances of a value are allowed, then there should be a test for zero of them; one of them; and some of them. Zero-One-Some is sometimes referred to as Zero-One-Many and is often related to cardinality in the database.&lt;/p&gt;

&lt;p&gt;For example, a view may return multiple records. When testing the view, a test should be written where we expect zero records returned; another test for exactly one record returned; and another test for several rows returned.&lt;/p&gt;
&lt;div class=&quot;image_block&quot;&gt;&lt;a href=&quot;/media/blogs/DataMgmt/ZeroOneZomeTesting.png?mtime=1323782210&quot;&gt;&lt;img src=&quot;/media/blogs/DataMgmt/ZeroOneZomeTesting.png?mtime=1323782210&quot; alt=&quot;&quot; width=&quot;898&quot; height=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;Zero-One-Some may be considered both on the input (e.g. a loop that may process multiple values) or the output (e.g. a query that returns multiple rows).&lt;/p&gt;

&lt;h2&gt;Purpose:&lt;/h2&gt;
&lt;p&gt;Zero-One-Some testing helps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Focus on correct behavior when there are multiple inputs or outputs&lt;/li&gt;
&lt;li&gt;Clarify the requirements when zero records should be processed; a common source of database defects.&lt;/li&gt;
&lt;li&gt;Prevent mistakes when using grouping in queries&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Example:&lt;/h2&gt;
&lt;p&gt;The business would like a report of the number of orders and the total revenue from those orders for each of the last 3 months. The report may look like this:&lt;/p&gt;
&lt;pre&gt;Month             Number of Orders              Revenue from Orders
Nov 2011          52                            $3582.00
Oct 2011          70                            $12399.50
Sep 2011          30                            $899.55&lt;/pre&gt;

&lt;p&gt;It is clear from this requirement that multiple orders must be processed. By applying zero-one-some, we are forced to ask the following questions:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;If there are no orders in the past 3 months, what should the report display? Should it list each month with 0 orders and $0?&lt;/li&gt;
&lt;li&gt;If there are no orders for any particular month, should that month still be listed in the report?&lt;/li&gt;
&lt;li&gt;Aggregations are always interesting spots to test. If there is a null value for an order amount, how should that be treated in the sum? If it&amp;#8217;s not included in the revenue, should it also not be included in the count?&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;

&lt;h2&gt;Notes:&lt;/h2&gt;
&lt;p&gt;Tests for zero records seem to uncover missing requirements or defects in code involving aggregations or in places where programmers assume that there will simply be data (perhaps because their test database already has data in it).&lt;/p&gt;

&lt;p&gt;Whereas tests for one and some records seem to uncover more problems in loops when a specific exit condition is needed.&lt;/p&gt;

&lt;p&gt;Tests for multiple (&quot;some&quot;) records may also be useful when data can be duplicated. Often we assume that data being processed is unique, but asking the question, &quot;what if there are multiple instances of the same record?&quot; can be illuminating.&lt;/p&gt;

&lt;h2&gt;Special Cases:&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Joins&lt;/strong&gt;: When multiple tables are joined together in a query, we must often consider the cardinality of the relationship between the tables. Is there a one-to-one relationship between the tables (and is that relationship enforced)? How about a one-to-many or a many-to-many relationship? These impact what tests are needed.&lt;/p&gt;

&lt;p&gt;The join type (e.g. inner, left or right outer, full) must also be considered. These are a few of the possibilities:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;A record exists in the left table, but there are no matches in the right table.&lt;/li&gt;
  &lt;li&gt;A record exists in the left table and there is exactly one match in the right table.&lt;/li&gt;
  &lt;li&gt;A record exists in the left table and has multiple matches in the right table.&lt;/li&gt;
  &lt;li&gt;A record exists in the right table, but has no matches in the left table.&lt;/li&gt;
  &lt;li&gt;And so on...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Filters&lt;/strong&gt;: Zero-one-some is also particularly useful in filters, such as WHERE clauses. Consider the following sub-query, for example:&lt;/p&gt;

&lt;div class=&quot;codebox&quot;&gt;&lt;div class=&quot;codeheader&quot;&gt;Code: &lt;span&gt;tsql&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;codeholder&quot;&gt;&lt;div class=&quot;tsql&quot; id=&quot;cb40693&quot; style=&quot;display: block; color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;SELECT&lt;/span&gt; Name &amp;nbsp; &lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;FROM&lt;/span&gt; OrderMgmt.&lt;span style=&quot;color: #202020;&quot;&gt;Customer&lt;/span&gt; &amp;nbsp;&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;WHERE&lt;/span&gt; CustomerId = &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;SELECT&lt;/span&gt; CustomerId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0000FF;&quot;&gt;FROM&lt;/span&gt; OrderMgmt.&lt;span style=&quot;color: #0000FF;&quot;&gt;Order&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000FF;&quot;&gt;WHERE&lt;/span&gt; OrderId = @OrderId&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;cb31397&quot; style=&quot;display: none; color: red;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;While this is a simplistic case, the programmer is likely expecting exactly one record to be returned from the sub-query. If the sub-query returns zero or multiple records though, the actual behavior of this query may not be so pleasant.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.lessthandot.com/index.php/DataMgmt/DBProgramming/zero-one-some-testing&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://lessthandot.com/&quot;&gt;LessThanDot&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p><em>I met Denis and Sebastian over a year ago when I attended their session on test driven database development.  Since then, I have been using tSQLt to add unit tests to my database.  The following post was written by Denis Lloyd Jr.</em></p>

<h2>About the Series</h2>
<p>Test case heuristics are patterns used to help decide the next test to write and ensure test coverage of requirements. This is the second post on a series of test case heuristics pertaining to database testing.</p>

<p>I'm trying out a new way of delivering series to a wider audience - post sharing! The series home is at: <a href="http://testdrivendatabases.com/test-heuristics">http://testdrivendatabases.com/test-heuristics</a> where you can find links to all articles in the series. The posts will be scattered over a variety of websites and blogs.</p>

<h2>Definition:</h2>
<p>Zero-One-Some says that if multiple instances of a value are allowed, then there should be a test for zero of them; one of them; and some of them. Zero-One-Some is sometimes referred to as Zero-One-Many and is often related to cardinality in the database.</p>

<p>For example, a view may return multiple records. When testing the view, a test should be written where we expect zero records returned; another test for exactly one record returned; and another test for several rows returned.</p>
<div class="image_block"><a href="http://blogs.lessthandot.com/media/blogs/DataMgmt/ZeroOneZomeTesting.png?mtime=1323782210"><img src="http://blogs.lessthandot.com/media/blogs/DataMgmt/ZeroOneZomeTesting.png?mtime=1323782210" alt="" width="898" height="240" /></a></div>

<p>Zero-One-Some may be considered both on the input (e.g. a loop that may process multiple values) or the output (e.g. a query that returns multiple rows).</p>

<h2>Purpose:</h2>
<p>Zero-One-Some testing helps:</p>
<ul>
<li>Focus on correct behavior when there are multiple inputs or outputs</li>
<li>Clarify the requirements when zero records should be processed; a common source of database defects.</li>
<li>Prevent mistakes when using grouping in queries</li>
</ul>

<h2>Example:</h2>
<p>The business would like a report of the number of orders and the total revenue from those orders for each of the last 3 months. The report may look like this:</p>
<pre>Month             Number of Orders              Revenue from Orders
Nov 2011          52                            $3582.00
Oct 2011          70                            $12399.50
Sep 2011          30                            $899.55</pre>

<p>It is clear from this requirement that multiple orders must be processed. By applying zero-one-some, we are forced to ask the following questions:<br />
<ul>
<li>If there are no orders in the past 3 months, what should the report display? Should it list each month with 0 orders and $0?</li>
<li>If there are no orders for any particular month, should that month still be listed in the report?</li>
<li>Aggregations are always interesting spots to test. If there is a null value for an order amount, how should that be treated in the sum? If it&#8217;s not included in the revenue, should it also not be included in the count?</li></ul></p>

<h2>Notes:</h2>
<p>Tests for zero records seem to uncover missing requirements or defects in code involving aggregations or in places where programmers assume that there will simply be data (perhaps because their test database already has data in it).</p>

<p>Whereas tests for one and some records seem to uncover more problems in loops when a specific exit condition is needed.</p>

<p>Tests for multiple ("some") records may also be useful when data can be duplicated. Often we assume that data being processed is unique, but asking the question, "what if there are multiple instances of the same record?" can be illuminating.</p>

<h2>Special Cases:</h2>
<p><strong>Joins</strong>: When multiple tables are joined together in a query, we must often consider the cardinality of the relationship between the tables. Is there a one-to-one relationship between the tables (and is that relationship enforced)? How about a one-to-many or a many-to-many relationship? These impact what tests are needed.</p>

<p>The join type (e.g. inner, left or right outer, full) must also be considered. These are a few of the possibilities:</p>

<ul>
  <li>A record exists in the left table, but there are no matches in the right table.</li>
  <li>A record exists in the left table and there is exactly one match in the right table.</li>
  <li>A record exists in the left table and has multiple matches in the right table.</li>
  <li>A record exists in the right table, but has no matches in the left table.</li>
  <li>And so on...</li>
</ul>

<p><strong>Filters</strong>: Zero-one-some is also particularly useful in filters, such as WHERE clauses. Consider the following sub-query, for example:</p>

<div class="codebox"><div class="codeheader"><span>tsql</span><div class="codebox_javascript_links"><a href="http://blogs.lessthandot.com" onclick="linenumberOnOff('cb73014'); return false;">Line number Off</a> | <a href="http://blogs.lessthandot.com#" onclick="expandCode('cb73014','cb93863'); return false;">Hide</a> | <a href="http://blogs.lessthandot.com#" onclick="selectCode(this); return false;">Select all</a></div></div><!-- we need this dummy div to fix a firefox bug when selecting code lines --><div class="codeholder"><div class="tsql" id="cb73014" style="display: block; color: rgb(0, 0, 0);"><ol><li style="" class="li1"><span style="color: #0000FF;">SELECT</span> Name &nbsp; </li><li style="" class="li2"><span style="color: #0000FF;">FROM</span> OrderMgmt.<span style="color: #202020;">Customer</span> &nbsp;</li><li style="" class="li1"><span style="color: #0000FF;">WHERE</span> CustomerId = &nbsp; &nbsp; &nbsp; &nbsp;</li><li style="" class="li2">&nbsp; &nbsp; <span style="color: #808080;">&#40;</span><span style="color: #0000FF;">SELECT</span> CustomerId &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000FF;">FROM</span> OrderMgmt.<span style="color: #0000FF;">Order</span> &nbsp; &nbsp; &nbsp; &nbsp; </li><li style="" class="li2">&nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">WHERE</span> OrderId = @OrderId<span style="color: #808080;">&#41;</span></li></ol></div><div id="cb93863" style="display: none; color: red;"></div></div></div>

<p>While this is a simplistic case, the programmer is likely expecting exactly one record to be returned from the sub-query. If the sub-query returns zero or multiple records though, the actual behavior of this query may not be so pleasant.</p><div class="item_footer"><p><small><a href="http://blogs.lessthandot.com/index.php/DataMgmt/DBProgramming/zero-one-some-testing">Original post</a> blogged on <a href="http://lessthandot.com/">LessThanDot</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.lessthandot.com/index.php/DataMgmt/DBProgramming/zero-one-some-testing#comments</comments>
			<wfw:commentRss>http://blogs.lessthandot.com/index.php/DataMgmt/?tempskin=_rss2&#38;disp=comments&#38;p=1540</wfw:commentRss>
		</item>
				<item>
			<title>tSQLt Unit Testing</title>
			<link>http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/tsqlt-unit-testing</link>
			<pubDate>Wed, 20 Jul 2011 15:25:00 +0000</pubDate>			<dc:creator>George Mastros (gmmastros)</dc:creator>
			<category domain="main">Data Modelling &amp; Design</category>
<category domain="alt">Database Programming</category>
<category domain="alt">Microsoft SQL Server</category>			<guid isPermaLink="false">1344@http://blogs.lessthandot.com/</guid>
						<description>&lt;p&gt;Yesterday, I attended a training class at Microsoft&amp;#8217;s facility in Malvern, Pennsylvania.  This training class was led by Sebastian Meine (&lt;a href=&quot;http://sqlity.net&quot;&gt;sqlity.net&lt;/a&gt;) and Dennis Lloyd (&lt;a href=&quot;http://curiouslycorrect.com&quot;&gt;curiouslycorrect.com&lt;/a&gt;). &lt;/p&gt;

&lt;p&gt;The class was from 9:00 am to 5:00 pm with a short break for lunch.  During the class, Dennis and Sebastian explained how to use tSQLt (&lt;a href=&quot;http://tSQLt.org&quot;&gt;http://tSQLt.org&lt;/a&gt;) to write unit tests for your database code.  tSQLt is a frame work that can be freely downloaded and applied to your database, allowing you to quickly and easily write unit tests.  After learning about the framework and working through the exercises during the class, it is immediately obvious to me how this framework and the techniques explained during the class will benefit my organization.&lt;/p&gt;

&lt;p&gt;Specifically, writing unit tests for the database will allow me to re-factor the code in a safe way, making sure that the code doesn&amp;#8217;t break because I can easily run all of the unit tests for the database, or just the unit tests associated with the code I am in the process of changing.&lt;/p&gt;

&lt;p&gt;Since I already have dozens of views, hundreds of functions and thousands of stored procedures, I cannot take the time to write all the unit tests required for the existing stuff, but I will create unit tests for the new code I write and also unit tests for any bug fixes with the existing code.  Over time I will have a set of unit tests for my database code that will undoubtedly allow me to spend less time fixing defects and more time writing new functionality.&lt;br /&gt;
With my application, most of the bugs discovered by the end user are data related. The tSQLt unit testing framework will allow me to write tests for those bugs and then have confidence that the bug will not return (in the released version of the software).&lt;/p&gt;

&lt;p&gt;Thank you Dennis and Sebastian for teaching this class and showing me this framework. I certainly appreciate it and will be sure to start using it.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/tsqlt-unit-testing&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://lessthandot.com/&quot;&gt;LessThanDot&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Yesterday, I attended a training class at Microsoft&#8217;s facility in Malvern, Pennsylvania.  This training class was led by Sebastian Meine (<a href="http://sqlity.net">sqlity.net</a>) and Dennis Lloyd (<a href="http://curiouslycorrect.com">curiouslycorrect.com</a>). </p>

<p>The class was from 9:00 am to 5:00 pm with a short break for lunch.  During the class, Dennis and Sebastian explained how to use tSQLt (<a href="http://tSQLt.org">http://tSQLt.org</a>) to write unit tests for your database code.  tSQLt is a frame work that can be freely downloaded and applied to your database, allowing you to quickly and easily write unit tests.  After learning about the framework and working through the exercises during the class, it is immediately obvious to me how this framework and the techniques explained during the class will benefit my organization.</p>

<p>Specifically, writing unit tests for the database will allow me to re-factor the code in a safe way, making sure that the code doesn&#8217;t break because I can easily run all of the unit tests for the database, or just the unit tests associated with the code I am in the process of changing.</p>

<p>Since I already have dozens of views, hundreds of functions and thousands of stored procedures, I cannot take the time to write all the unit tests required for the existing stuff, but I will create unit tests for the new code I write and also unit tests for any bug fixes with the existing code.  Over time I will have a set of unit tests for my database code that will undoubtedly allow me to spend less time fixing defects and more time writing new functionality.<br />
With my application, most of the bugs discovered by the end user are data related. The tSQLt unit testing framework will allow me to write tests for those bugs and then have confidence that the bug will not return (in the released version of the software).</p>

<p>Thank you Dennis and Sebastian for teaching this class and showing me this framework. I certainly appreciate it and will be sure to start using it.</p><div class="item_footer"><p><small><a href="http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/tsqlt-unit-testing">Original post</a> blogged on <a href="http://lessthandot.com/">LessThanDot</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/tsqlt-unit-testing#comments</comments>
			<wfw:commentRss>http://blogs.lessthandot.com/index.php/DataMgmt/?tempskin=_rss2&#38;disp=comments&#38;p=1344</wfw:commentRss>
		</item>
				<item>
			<title>Understanding SQL Server 2000 Pivot with Aggregates</title>
			<link>http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/understanding-sql-server-2000-pivot</link>
			<pubDate>Tue, 08 Mar 2011 13:45:00 +0000</pubDate>			<dc:creator>George Mastros (gmmastros)</dc:creator>
			<category domain="main">Data Modelling &amp; Design</category>
<category domain="alt">Database Programming</category>
<category domain="alt">Microsoft SQL Server</category>			<guid isPermaLink="false">1150@http://blogs.lessthandot.com/</guid>
						<description>&lt;p&gt;&lt;a href=&quot;http://blogs.lessthandot.com/index.php/DataMgmt/DBProgramming/come-one-come-all-to&quot;&gt;&lt;img src=&quot;http://blogs.lessthandot.com/media/blogs/DataMgmt/olap_1.gif&quot; align=&quot;left&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
This month&#039;s T-SQL Tuesday is being hosted by our very own, Jes Borland (&lt;a href=&quot;http://twitter.com/grrl_geek&quot;&gt;Twitter&lt;/a&gt; | &lt;a href=&quot;http://blogs.lessthandot.com/index.php/All/?disp=authdir&amp;amp;author=420&quot;&gt;Blog&lt;/a&gt;).  Not only is she hosting this month but she is making it possible for LessThanDot&#039;s first T-SQL Tuesday event.  The topic that is brought to us is to discuss with everyone how we solved business problems with aggregate functions.  I thought this would be a good time to explain how you can write a pivot query in SQL 2000 using aggregate functions.  Writing a query is one thing, understanding how it works is another.  The goal of this blog post is to explain HOW it works so that it can be applied to other interesting problems.&lt;/p&gt;

&lt;p&gt;Why?  This database engine is 11 years old, why bother?  We are sometimes stuck dealing with an older database engine.   Understanding the concept behind this pivot will also allow you to use the technique in other interesting ways.  Personally, I think that by understanding how this works is another step in the process of &amp;#8220;thinking in sets&amp;#8221;.&lt;/p&gt;

&lt;p&gt;When we think of pivoting data, we usually want to see several rows of data displayed as additional columns.  Often times this is for reporting purposes or GUI displays within an application.&lt;/p&gt;

&lt;p&gt;This blog is meant to explain the process of pivoting the data.  Sure, many people know how to write a pivot query using aggregate functions, but how many people actually understand it from a set based perspective.  Understanding what the code is doing will help us to apply the principals to other queries.&lt;/p&gt;

&lt;p&gt;To explain this process, I will use a set of dummy data to aide in visualizing the data.  I will also build up to the final query, but examining each step along the way.&lt;/p&gt;

&lt;p&gt;The data:&lt;/p&gt;
&lt;pre&gt;
Id          Name                 Value
----------- -------------------- --------------------
1           Name                 George
1           ShoeSize             9.5

2           Name                 Bill
2           ShoeSize             10.5

3           Name                 John
3           ShoeSize             9

4           Name                 Greg
4           ShoeSize             9
&lt;/pre&gt;

&lt;p&gt;The data is relatively simple, but is meant to demonstrate the concept.  The goal of this blog is to explain how we can pivot the data shown above in to the following output.&lt;/p&gt;

&lt;pre&gt;
Id          Name                 ShoeSize
----------- -------------------- --------------------
1           George               9.5
2           Bill                 10.5
3           John                 9
4           Greg                 9
&lt;/pre&gt;

&lt;p&gt;As you can see, the original data had the name and shoe size for each person on separate rows.  The output has just a single row per person but with additional columns for the data.&lt;/p&gt;

&lt;p&gt;Setting up the code....&lt;/p&gt;

&lt;div class=&quot;codebox&quot;&gt;&lt;div class=&quot;codeheader&quot;&gt;Code: &lt;span&gt;tsql&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;codeholder&quot;&gt;&lt;div class=&quot;tsql&quot; id=&quot;cb34486&quot; style=&quot;display: block; color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Create&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Table&lt;/span&gt; #Temp&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;Id &lt;span style=&quot;color: #0000FF;&quot;&gt;Int&lt;/span&gt;, Name &lt;span style=&quot;color: #0000FF;&quot;&gt;VarChar&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;20&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span style=&quot;color: #0000FF;&quot;&gt;Value&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;VarChar&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;20&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Insert&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Into&lt;/span&gt; #Temp &lt;span style=&quot;color: #0000FF;&quot;&gt;Values&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;1&lt;/span&gt;, &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;Name&#039;&lt;/span&gt;,&lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;George&#039;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Insert&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Into&lt;/span&gt; #Temp &lt;span style=&quot;color: #0000FF;&quot;&gt;Values&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;1&lt;/span&gt;, &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;ShoeSize&#039;&lt;/span&gt;,&lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;9.5&#039;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Insert&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Into&lt;/span&gt; #Temp &lt;span style=&quot;color: #0000FF;&quot;&gt;Values&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;2&lt;/span&gt;, &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;Name&#039;&lt;/span&gt;,&lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;Bill&#039;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Insert&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Into&lt;/span&gt; #Temp &lt;span style=&quot;color: #0000FF;&quot;&gt;Values&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;2&lt;/span&gt;, &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;ShoeSize&#039;&lt;/span&gt;,&lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;10.5&#039;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Insert&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Into&lt;/span&gt; #Temp &lt;span style=&quot;color: #0000FF;&quot;&gt;Values&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;3&lt;/span&gt;, &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;Name&#039;&lt;/span&gt;,&lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;John&#039;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Insert&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Into&lt;/span&gt; #Temp &lt;span style=&quot;color: #0000FF;&quot;&gt;Values&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;3&lt;/span&gt;, &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;ShoeSize&#039;&lt;/span&gt;,&lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;9&#039;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Insert&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Into&lt;/span&gt; #Temp &lt;span style=&quot;color: #0000FF;&quot;&gt;Values&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;4&lt;/span&gt;, &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;Name&#039;&lt;/span&gt;,&lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;Greg&#039;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Insert&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Into&lt;/span&gt; #Temp &lt;span style=&quot;color: #0000FF;&quot;&gt;Values&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;4&lt;/span&gt;, &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;ShoeSize&#039;&lt;/span&gt;,&lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;9&#039;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;cb98791&quot; style=&quot;display: none; color: red;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Our first query will simply show the data.&lt;/p&gt;

&lt;div class=&quot;codebox&quot;&gt;&lt;div class=&quot;codeheader&quot;&gt;Code: &lt;span&gt;tsql&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;codeholder&quot;&gt;&lt;div class=&quot;tsql&quot; id=&quot;cb30267&quot; style=&quot;display: block; color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Select&lt;/span&gt; *&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;From&lt;/span&gt; &amp;nbsp; #Temp&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;cb31774&quot; style=&quot;display: none; color: red;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Simple.  We see all the data in the table.  For our next step, let&#039;s set up the output structure.  We know we want to see the ID column and the Value column twice, once for the person&#039;s name and again for the shoe size. &lt;/p&gt;

&lt;div class=&quot;codebox&quot;&gt;&lt;div class=&quot;codeheader&quot;&gt;Code: &lt;span&gt;tsql&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;codeholder&quot;&gt;&lt;div class=&quot;tsql&quot; id=&quot;cb23128&quot; style=&quot;display: block; color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Select&lt;/span&gt; Id,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0000FF;&quot;&gt;Value&lt;/span&gt;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0000FF;&quot;&gt;Value&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;From&lt;/span&gt; &amp;nbsp; #Temp&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;cb49809&quot; style=&quot;display: none; color: red;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;pre&gt;Id          Value                Value
----------- -------------------- --------------------
1           George               George
1           9.5                  9.5
2           Bill                 Bill
2           10.5                 10.5
3           John                 John
3           9                    9
4           Greg                 Greg
4           9                    9&lt;/pre&gt;

&lt;p&gt;This query is simply duplicating the data in two columns.  Ultimately, we will want the second column to show the person&#039;s name, and the third column to show the shoe size.  For the next step, let&#039;s show just the name in the second column and the shoe size in the third.  We will do this using a case expression:&lt;/p&gt;

&lt;div class=&quot;codebox&quot;&gt;&lt;div class=&quot;codeheader&quot;&gt;Code: &lt;span&gt;tsql&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;codeholder&quot;&gt;&lt;div class=&quot;tsql&quot; id=&quot;cb54052&quot; style=&quot;display: block; color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Select&lt;/span&gt; Id,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0000FF;&quot;&gt;Case&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;When&lt;/span&gt; Name = &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;Name&#039;&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Then&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Value&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;End&lt;/span&gt;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0000FF;&quot;&gt;Case&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;When&lt;/span&gt; Name = &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;ShoeSize&#039;&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Then&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Value&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;End&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;From&lt;/span&gt; &amp;nbsp; #Temp&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;cb99271&quot; style=&quot;display: none; color: red;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;pre&gt;
Id                               
----------- -------------------- --------------------
1           George               NULL
1           NULL                 9.5
2           Bill                 NULL
2           NULL                 10.5
3           John                 NULL
3           NULL                 9
4           Greg                 NULL
4           NULL                 9&lt;/pre&gt;

&lt;p&gt;Take a look at the case expression.  Notice that there is no ELSE clause.  Without an ELSE, the CASE expression will return NULL.  This is extremely important for our end result.  However, it&#039;s important to realize that the second column has the person&#039;s name and NULL, and the third column has shoe size and null.  Next we will introduce column aliases.&lt;/p&gt;

&lt;div class=&quot;codebox&quot;&gt;&lt;div class=&quot;codeheader&quot;&gt;Code: &lt;span&gt;tsql&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;codeholder&quot;&gt;&lt;div class=&quot;tsql&quot; id=&quot;cb62161&quot; style=&quot;display: block; color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Select&lt;/span&gt; Id,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0000FF;&quot;&gt;Case&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;When&lt;/span&gt; Name = &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;Name&#039;&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Then&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Value&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;As&lt;/span&gt; Name,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0000FF;&quot;&gt;Case&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;When&lt;/span&gt; Name = &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;ShoeSize&#039;&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Then&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Value&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;As&lt;/span&gt; ShoeSize&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;From&lt;/span&gt; &amp;nbsp; #Temp&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;cb66508&quot; style=&quot;display: none; color: red;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;pre&gt;
Id          Name                 ShoeSize
----------- -------------------- --------------------
1           George               NULL
1           NULL                 9.5
2           Bill                 NULL
2           NULL                 10.5
3           John                 NULL
3           NULL                 9
4           Greg                 NULL
4           NULL                 9&lt;/pre&gt;

&lt;p&gt;Nothing fancy here.  Just the column names.  We still have NULL&#039;s in our data that we will want to eliminate.  Which leads us to our next step, and the most important part, too.  When we use aggregates, it&#039;s important to realize that they ignore NULL&#039;s in the data.  For example, if we have 2 rows with &quot;George&quot; in one row and NULL in the other row, Max(Column) will ignore the NULL and return George.  We can use that to our advantage here.&lt;/p&gt;

&lt;div class=&quot;codebox&quot;&gt;&lt;div class=&quot;codeheader&quot;&gt;Code: &lt;span&gt;tsql&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;codeholder&quot;&gt;&lt;div class=&quot;tsql&quot; id=&quot;cb17856&quot; style=&quot;display: block; color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Select&lt;/span&gt; Id,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #FF00FF;&quot;&gt;Min&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Case&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;When&lt;/span&gt; Name = &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;Name&#039;&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Then&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Value&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;End&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;As&lt;/span&gt; Name,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #FF00FF;&quot;&gt;Min&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Case&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;When&lt;/span&gt; Name = &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;ShoeSize&#039;&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Then&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;Value&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;End&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;As&lt;/span&gt; ShoeSize&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;From&lt;/span&gt; &amp;nbsp; #Temp&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Group&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;By&lt;/span&gt; Id&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;cb21676&quot; style=&quot;display: none; color: red;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;pre&gt;
Id          Name                 ShoeSize
----------- -------------------- --------------------
1           George               9.5
2           Bill                 10.5
3           John                 9
4           Greg                 9
&lt;/pre&gt;

&lt;p&gt;As you can see, we finally got the results we wanted, effectively pivoting the data using code that will comfortably run in SQL2000 (and many other databases, too).&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/understanding-sql-server-2000-pivot&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://lessthandot.com/&quot;&gt;LessThanDot&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p><a href="http://blogs.lessthandot.com/index.php/DataMgmt/DBProgramming/come-one-come-all-to"><img src="http://blogs.lessthandot.com/media/blogs/DataMgmt/olap_1.gif" align="left" /></a><br />
This month's T-SQL Tuesday is being hosted by our very own, Jes Borland (<a href="http://twitter.com/grrl_geek">Twitter</a> | <a href="http://blogs.lessthandot.com/index.php/All/?disp=authdir&amp;author=420">Blog</a>).  Not only is she hosting this month but she is making it possible for LessThanDot's first T-SQL Tuesday event.  The topic that is brought to us is to discuss with everyone how we solved business problems with aggregate functions.  I thought this would be a good time to explain how you can write a pivot query in SQL 2000 using aggregate functions.  Writing a query is one thing, understanding how it works is another.  The goal of this blog post is to explain HOW it works so that it can be applied to other interesting problems.</p>

<p>Why?  This database engine is 11 years old, why bother?  We are sometimes stuck dealing with an older database engine.   Understanding the concept behind this pivot will also allow you to use the technique in other interesting ways.  Personally, I think that by understanding how this works is another step in the process of &#8220;thinking in sets&#8221;.</p>

<p>When we think of pivoting data, we usually want to see several rows of data displayed as additional columns.  Often times this is for reporting purposes or GUI displays within an application.</p>

<p>This blog is meant to explain the process of pivoting the data.  Sure, many people know how to write a pivot query using aggregate functions, but how many people actually understand it from a set based perspective.  Understanding what the code is doing will help us to apply the principals to other queries.</p>

<p>To explain this process, I will use a set of dummy data to aide in visualizing the data.  I will also build up to the final query, but examining each step along the way.</p>

<p>The data:</p>
<pre>
Id          Name                 Value
----------- -------------------- --------------------
1           Name                 George
1           ShoeSize             9.5

2           Name                 Bill
2           ShoeSize             10.5

3           Name                 John
3           ShoeSize             9

4           Name                 Greg
4           ShoeSize             9
</pre>

<p>The data is relatively simple, but is meant to demonstrate the concept.  The goal of this blog is to explain how we can pivot the data shown above in to the following output.</p>

<pre>
Id          Name                 ShoeSize
----------- -------------------- --------------------
1           George               9.5
2           Bill                 10.5
3           John                 9
4           Greg                 9
</pre>

<p>As you can see, the original data had the name and shoe size for each person on separate rows.  The output has just a single row per person but with additional columns for the data.</p>

<p>Setting up the code....</p>

<div class="codebox"><div class="codeheader"><span>tsql</span><div class="codebox_javascript_links"><a href="http://blogs.lessthandot.com" onclick="linenumberOnOff('cb78775'); return false;">Line number Off</a> | <a href="http://blogs.lessthandot.com#" onclick="expandCode('cb78775','cb30897'); return false;">Hide</a> | <a href="http://blogs.lessthandot.com#" onclick="selectCode(this); return false;">Select all</a></div></div><!-- we need this dummy div to fix a firefox bug when selecting code lines --><div class="codeholder"><div class="tsql" id="cb78775" style="display: block; color: rgb(0, 0, 0);"><ol><li style="" class="li1"><span style="color: #0000FF;">Create</span> <span style="color: #0000FF;">Table</span> #Temp<span style="color: #808080;">&#40;</span>Id <span style="color: #0000FF;">Int</span>, Name <span style="color: #0000FF;">VarChar</span><span style="color: #808080;">&#40;</span><span style="color: #000;">20</span><span style="color: #808080;">&#41;</span>, <span style="color: #0000FF;">Value</span> <span style="color: #0000FF;">VarChar</span><span style="color: #808080;">&#40;</span><span style="color: #000;">20</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2">&nbsp;</li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> #Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #000;">1</span>, <span style="color: #FF0000;">'Name'</span>,<span style="color: #FF0000;">'George'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> #Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #000;">1</span>, <span style="color: #FF0000;">'ShoeSize'</span>,<span style="color: #FF0000;">'9.5'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1">&nbsp;</li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> #Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2</span>, <span style="color: #FF0000;">'Name'</span>,<span style="color: #FF0000;">'Bill'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> #Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2</span>, <span style="color: #FF0000;">'ShoeSize'</span>,<span style="color: #FF0000;">'10.5'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2">&nbsp;</li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> #Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #000;">3</span>, <span style="color: #FF0000;">'Name'</span>,<span style="color: #FF0000;">'John'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> #Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #000;">3</span>, <span style="color: #FF0000;">'ShoeSize'</span>,<span style="color: #FF0000;">'9'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1">&nbsp;</li><li style="" class="li2"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> #Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #000;">4</span>, <span style="color: #FF0000;">'Name'</span>,<span style="color: #FF0000;">'Greg'</span><span style="color: #808080;">&#41;</span></li><li style="" class="li1"><span style="color: #0000FF;">Insert</span> <span style="color: #0000FF;">Into</span> #Temp <span style="color: #0000FF;">Values</span><span style="color: #808080;">&#40;</span><span style="color: #000;">4</span>, <span style="color: #FF0000;">'ShoeSize'</span>,<span style="color: #FF0000;">'9'</span><span style="color: #808080;">&#41;</span></li></ol></div><div id="cb30897" style="display: none; color: red;"></div></div></div>

<p>Our first query will simply show the data.</p>

<div class="codebox"><div class="codeheader"><span>tsql</span><div class="codebox_javascript_links"><a href="http://blogs.lessthandot.com" onclick="linenumberOnOff('cb65709'); return false;">Line number Off</a> | <a href="http://blogs.lessthandot.com#" onclick="expandCode('cb65709','cb92100'); return false;">Hide</a> | <a href="http://blogs.lessthandot.com#" onclick="selectCode(this); return false;">Select all</a></div></div><!-- we need this dummy div to fix a firefox bug when selecting code lines --><div class="codeholder"><div class="tsql" id="cb65709" style="display: block; color: rgb(0, 0, 0);"><ol><li style="" class="li1"><span style="color: #0000FF;">Select</span> *</li><li style="" class="li2"><span style="color: #0000FF;">From</span> &nbsp; #Temp</li></ol></div><div id="cb92100" style="display: none; color: red;"></div></div></div>

<p>Simple.  We see all the data in the table.  For our next step, let's set up the output structure.  We know we want to see the ID column and the Value column twice, once for the person's name and again for the shoe size. </p>

<div class="codebox"><div class="codeheader"><span>tsql</span><div class="codebox_javascript_links"><a href="http://blogs.lessthandot.com" onclick="linenumberOnOff('cb42140'); return false;">Line number Off</a> | <a href="http://blogs.lessthandot.com#" onclick="expandCode('cb42140','cb97157'); return false;">Hide</a> | <a href="http://blogs.lessthandot.com#" onclick="selectCode(this); return false;">Select all</a></div></div><!-- we need this dummy div to fix a firefox bug when selecting code lines --><div class="codeholder"><div class="tsql" id="cb42140" style="display: block; color: rgb(0, 0, 0);"><ol><li style="" class="li1"><span style="color: #0000FF;">Select</span> Id,</li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000FF;">Value</span>,</li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000FF;">Value</span></li><li style="" class="li2"><span style="color: #0000FF;">From</span> &nbsp; #Temp</li></ol></div><div id="cb97157" style="display: none; color: red;"></div></div></div>

<pre>Id          Value                Value
----------- -------------------- --------------------
1           George               George
1           9.5                  9.5
2           Bill                 Bill
2           10.5                 10.5
3           John                 John
3           9                    9
4           Greg                 Greg
4           9                    9</pre>

<p>This query is simply duplicating the data in two columns.  Ultimately, we will want the second column to show the person's name, and the third column to show the shoe size.  For the next step, let's show just the name in the second column and the shoe size in the third.  We will do this using a case expression:</p>

<div class="codebox"><div class="codeheader"><span>tsql</span><div class="codebox_javascript_links"><a href="http://blogs.lessthandot.com" onclick="linenumberOnOff('cb99759'); return false;">Line number Off</a> | <a href="http://blogs.lessthandot.com#" onclick="expandCode('cb99759','cb14776'); return false;">Hide</a> | <a href="http://blogs.lessthandot.com#" onclick="selectCode(this); return false;">Select all</a></div></div><!-- we need this dummy div to fix a firefox bug when selecting code lines --><div class="codeholder"><div class="tsql" id="cb99759" style="display: block; color: rgb(0, 0, 0);"><ol><li style="" class="li1"><span style="color: #0000FF;">Select</span> Id,</li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000FF;">Case</span> <span style="color: #0000FF;">When</span> Name = <span style="color: #FF0000;">'Name'</span> <span style="color: #0000FF;">Then</span> <span style="color: #0000FF;">Value</span> <span style="color: #0000FF;">End</span>,</li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000FF;">Case</span> <span style="color: #0000FF;">When</span> Name = <span style="color: #FF0000;">'ShoeSize'</span> <span style="color: #0000FF;">Then</span> <span style="color: #0000FF;">Value</span> <span style="color: #0000FF;">End</span></li><li style="" class="li2"><span style="color: #0000FF;">From</span> &nbsp; #Temp</li></ol></div><div id="cb14776" style="display: none; color: red;"></div></div></div>

<pre>
Id                               
----------- -------------------- --------------------
1           George               NULL
1           NULL                 9.5
2           Bill                 NULL
2           NULL                 10.5
3           John                 NULL
3           NULL                 9
4           Greg                 NULL
4           NULL                 9</pre>

<p>Take a look at the case expression.  Notice that there is no ELSE clause.  Without an ELSE, the CASE expression will return NULL.  This is extremely important for our end result.  However, it's important to realize that the second column has the person's name and NULL, and the third column has shoe size and null.  Next we will introduce column aliases.</p>

<div class="codebox"><div class="codeheader"><span>tsql</span><div class="codebox_javascript_links"><a href="http://blogs.lessthandot.com" onclick="linenumberOnOff('cb91366'); return false;">Line number Off</a> | <a href="http://blogs.lessthandot.com#" onclick="expandCode('cb91366','cb63232'); return false;">Hide</a> | <a href="http://blogs.lessthandot.com#" onclick="selectCode(this); return false;">Select all</a></div></div><!-- we need this dummy div to fix a firefox bug when selecting code lines --><div class="codeholder"><div class="tsql" id="cb91366" style="display: block; color: rgb(0, 0, 0);"><ol><li style="" class="li1"><span style="color: #0000FF;">Select</span> Id,</li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000FF;">Case</span> <span style="color: #0000FF;">When</span> Name = <span style="color: #FF0000;">'Name'</span> <span style="color: #0000FF;">Then</span> <span style="color: #0000FF;">Value</span> <span style="color: #0000FF;">End</span> <span style="color: #0000FF;">As</span> Name,</li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000FF;">Case</span> <span style="color: #0000FF;">When</span> Name = <span style="color: #FF0000;">'ShoeSize'</span> <span style="color: #0000FF;">Then</span> <span style="color: #0000FF;">Value</span> <span style="color: #0000FF;">End</span> <span style="color: #0000FF;">As</span> ShoeSize</li><li style="" class="li2"><span style="color: #0000FF;">From</span> &nbsp; #Temp</li></ol></div><div id="cb63232" style="display: none; color: red;"></div></div></div>

<pre>
Id          Name                 ShoeSize
----------- -------------------- --------------------
1           George               NULL
1           NULL                 9.5
2           Bill                 NULL
2           NULL                 10.5
3           John                 NULL
3           NULL                 9
4           Greg                 NULL
4           NULL                 9</pre>

<p>Nothing fancy here.  Just the column names.  We still have NULL's in our data that we will want to eliminate.  Which leads us to our next step, and the most important part, too.  When we use aggregates, it's important to realize that they ignore NULL's in the data.  For example, if we have 2 rows with "George" in one row and NULL in the other row, Max(Column) will ignore the NULL and return George.  We can use that to our advantage here.</p>

<div class="codebox"><div class="codeheader"><span>tsql</span><div class="codebox_javascript_links"><a href="http://blogs.lessthandot.com" onclick="linenumberOnOff('cb5840'); return false;">Line number Off</a> | <a href="http://blogs.lessthandot.com#" onclick="expandCode('cb5840','cb3754'); return false;">Hide</a> | <a href="http://blogs.lessthandot.com#" onclick="selectCode(this); return false;">Select all</a></div></div><!-- we need this dummy div to fix a firefox bug when selecting code lines --><div class="codeholder"><div class="tsql" id="cb5840" style="display: block; color: rgb(0, 0, 0);"><ol><li style="" class="li1"><span style="color: #0000FF;">Select</span> Id,</li><li style="" class="li2">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #FF00FF;">Min</span><span style="color: #808080;">&#40;</span><span style="color: #0000FF;">Case</span> <span style="color: #0000FF;">When</span> Name = <span style="color: #FF0000;">'Name'</span> <span style="color: #0000FF;">Then</span> <span style="color: #0000FF;">Value</span> <span style="color: #0000FF;">End</span><span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">As</span> Name,</li><li style="" class="li1">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #FF00FF;">Min</span><span style="color: #808080;">&#40;</span><span style="color: #0000FF;">Case</span> <span style="color: #0000FF;">When</span> Name = <span style="color: #FF0000;">'ShoeSize'</span> <span style="color: #0000FF;">Then</span> <span style="color: #0000FF;">Value</span> <span style="color: #0000FF;">End</span><span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">As</span> ShoeSize</li><li style="" class="li2"><span style="color: #0000FF;">From</span> &nbsp; #Temp</li><li style="" class="li1"><span style="color: #0000FF;">Group</span> <span style="color: #0000FF;">By</span> Id</li></ol></div><div id="cb3754" style="display: none; color: red;"></div></div></div>

<pre>
Id          Name                 ShoeSize
----------- -------------------- --------------------
1           George               9.5
2           Bill                 10.5
3           John                 9
4           Greg                 9
</pre>

<p>As you can see, we finally got the results we wanted, effectively pivoting the data using code that will comfortably run in SQL2000 (and many other databases, too).</p><div class="item_footer"><p><small><a href="http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/understanding-sql-server-2000-pivot">Original post</a> blogged on <a href="http://lessthandot.com/">LessThanDot</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/understanding-sql-server-2000-pivot#comments</comments>
			<wfw:commentRss>http://blogs.lessthandot.com/index.php/DataMgmt/?tempskin=_rss2&#38;disp=comments&#38;p=1150</wfw:commentRss>
		</item>
				<item>
			<title>T-SQL Tuesday #13: Is that what you really want?</title>
			<link>http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/t-sql-tuesday-13-is-that-what-you-really</link>
			<pubDate>Tue, 14 Dec 2010 14:30:23 +0000</pubDate>			<dc:creator>George Mastros (gmmastros)</dc:creator>
			<category domain="main">Data Modelling &amp; Design</category>
<category domain="alt">Database Programming</category>			<guid isPermaLink="false">1046@http://blogs.lessthandot.com/</guid>
						<description>&lt;p&gt;&lt;a href=&quot;http://www.sqlservercentral.com/blogs/steve_jones/archive/2010/12/07/t_2D00_sql-tuesday-_2300_13-_2D00_-what-the-business-says-is-not-what-the-business-wants.aspx&quot;&gt;&lt;/p&gt;&lt;div class=&quot;image_block&quot;&gt;&lt;img src=&quot;http://blogs.lessthandot.com/media/blogs/DataMgmt/olap_1.gif&quot; alt=&quot;&quot; title=&quot;&quot; width=&quot;154&quot; height=&quot;154&quot; align=&quot;left&quot; /&gt;&lt;/div&gt;&lt;/a&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Steve Jones (&lt;a href=&quot;http://twitter.com/way0utwest&quot;&gt;Twitter&lt;/a&gt; | &lt;a href=&quot;http://www.sqlservercentral.com/blogs/steve_jones/default.aspx&quot;&gt;Blog&lt;/a&gt;), The Voice of the DBA, is hosting the T-SQL Tuesday blogging fest over on &lt;a href=&quot;http://www.sqlservercentral.com/blogs/steve_jones/archive/2010/12/07/t_2D00_sql-tuesday-_2300_13-_2D00_-what-the-business-says-is-not-what-the-business-wants.aspx&quot;&gt;SQLServerCentral.com&lt;/a&gt; this month.  This months topic involves businesses and what they really want.&lt;br /&gt;
&lt;br /&gt;
As many of you know, I am the owner of a small software company that satisfies a niche market.  I&#039;ve been in business for 13 years now, and am still working on the same core application.  I constantly find new features and functionality to offer in the app, continually improving it for the benefit of my customers.  I think it&#039;s safe to say that I understand the technical challenge that my software accommodates, as well as the business implications involved.  I also have a very good appreciation for the logistics involved in the business process, and the most efficient ways to accomplish the business goals.&lt;br /&gt;
&lt;br /&gt;
Occasionally, we will come across a customer that thinks their method of accomplishing the business&#039;s goals is the only correct one, even though my experience clearly indicates there is a better (more efficient) way.  I was talking to Ted/onpnt (&lt;a href=&quot;http://twitter.com/onpnt&quot;&gt;Twitter&lt;/a&gt; | &lt;a href=&quot;http://blogs.lessthandot.com/index.php/All/?disp=authdir&amp;amp;author=68&quot;&gt;Blog&lt;/a&gt;) yesterday about this very same topic.  The conversation went something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;George:&lt;/strong&gt; You should see the frickin hoops I gotta jump through for this one customer. I feel like a whipping boy.&lt;br /&gt;
&lt;strong&gt;Ted:&lt;/strong&gt; what did they have you doing??&lt;br /&gt;
&lt;strong&gt;George:&lt;/strong&gt; They refuse to use (software) they way it was intended. They want a &quot;Blah Blah Report&quot; where each..... This report is not accurate because (software) wasn&#039;t designed this way. Instead, each... then a report showing... should be used instead.&lt;br /&gt;
&lt;strong&gt;Ted:&lt;/strong&gt; so they want you to write a report that doesn&#039;t even reflect the way the system works.&lt;br /&gt;
&lt;strong&gt;George:&lt;/strong&gt; It&#039;s like.... well.... trying to use Excel to manage a sql database.&lt;br /&gt;
&lt;strong&gt;Ted:&lt;/strong&gt; LOL&lt;br /&gt;
&lt;strong&gt;George:&lt;/strong&gt; Yeah. Write a report that magically gets info, never makes a mistake, and base it all on completely unrelated information.&lt;br /&gt;
&lt;strong&gt;Ted:&lt;/strong&gt; LOL&lt;br /&gt;
&lt;strong&gt;George:&lt;/strong&gt; oh.... and I&#039;m supposed to make it faster, too.&lt;br /&gt;
&lt;strong&gt;Ted:&lt;/strong&gt; ROFL but of course!&lt;br /&gt;
&lt;br /&gt;
Whenever I run in to a problem with a customer, I try to use the following steps.&lt;br /&gt;
&lt;br /&gt;
1. Manage expectations at the beginning.  This allows you to prevent possible complications in the future by expressing what the customer should reasonably expect from the software.&lt;br /&gt;
&lt;br /&gt;
2. Effectively train the customer in the proper operation of the software.  Part of the training process should be the &quot;big picture&quot; because it allows them to see and appreciate your methods for handling the business problems in an efficient manner.&lt;br /&gt;
&lt;br /&gt;
3. When a customer has unrealistic expectations, it&#039;s important to explain (at a high level) why they are unrealistic.  Explain the benefits of the currently implemented method and the draw backs with their proposed method.&lt;br /&gt;
&lt;br /&gt;
4. When they insist on new/different functionality, you should attempt to work out a compromise that allows your existing functionality to satisfy their requirements.  Often times, a small tweak to current functionality will satisfy their requirements.&lt;br /&gt;
&lt;br /&gt;
5. When all else fails, the customer is always right.  If you refuse to implement the functionality they want, you run the risk of losing their business, and potentially word-of-mouth business as well.&lt;br /&gt;
&lt;br /&gt;
As developers, we have a responsibility to provide software that makes our customers job easier and more efficient.  We also have a responsibility to advise them of alternative methods (new to them) that would improve their efficiency.  If all else fails, be prepared to give the customer what they want.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/t-sql-tuesday-13-is-that-what-you-really&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://lessthandot.com/&quot;&gt;LessThanDot&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p><a href="http://www.sqlservercentral.com/blogs/steve_jones/archive/2010/12/07/t_2D00_sql-tuesday-_2300_13-_2D00_-what-the-business-says-is-not-what-the-business-wants.aspx"></p><div class="image_block"><img src="http://blogs.lessthandot.com/media/blogs/DataMgmt/olap_1.gif" alt="" title="" width="154" height="154" align="left" /></div></a><p><br /><br /></p><p>Steve Jones (<a href="http://twitter.com/way0utwest">Twitter</a> | <a href="http://www.sqlservercentral.com/blogs/steve_jones/default.aspx">Blog</a>), The Voice of the DBA, is hosting the T-SQL Tuesday blogging fest over on <a href="http://www.sqlservercentral.com/blogs/steve_jones/archive/2010/12/07/t_2D00_sql-tuesday-_2300_13-_2D00_-what-the-business-says-is-not-what-the-business-wants.aspx">SQLServerCentral.com</a> this month.  This months topic involves businesses and what they really want.<br />
<br />
As many of you know, I am the owner of a small software company that satisfies a niche market.  I've been in business for 13 years now, and am still working on the same core application.  I constantly find new features and functionality to offer in the app, continually improving it for the benefit of my customers.  I think it's safe to say that I understand the technical challenge that my software accommodates, as well as the business implications involved.  I also have a very good appreciation for the logistics involved in the business process, and the most efficient ways to accomplish the business goals.<br />
<br />
Occasionally, we will come across a customer that thinks their method of accomplishing the business's goals is the only correct one, even though my experience clearly indicates there is a better (more efficient) way.  I was talking to Ted/onpnt (<a href="http://twitter.com/onpnt">Twitter</a> | <a href="http://blogs.lessthandot.com/index.php/All/?disp=authdir&amp;author=68">Blog</a>) yesterday about this very same topic.  The conversation went something like this:<br />
<br />
<strong>George:</strong> You should see the frickin hoops I gotta jump through for this one customer. I feel like a whipping boy.<br />
<strong>Ted:</strong> what did they have you doing??<br />
<strong>George:</strong> They refuse to use (software) they way it was intended. They want a "Blah Blah Report" where each..... This report is not accurate because (software) wasn't designed this way. Instead, each... then a report showing... should be used instead.<br />
<strong>Ted:</strong> so they want you to write a report that doesn't even reflect the way the system works.<br />
<strong>George:</strong> It's like.... well.... trying to use Excel to manage a sql database.<br />
<strong>Ted:</strong> LOL<br />
<strong>George:</strong> Yeah. Write a report that magically gets info, never makes a mistake, and base it all on completely unrelated information.<br />
<strong>Ted:</strong> LOL<br />
<strong>George:</strong> oh.... and I'm supposed to make it faster, too.<br />
<strong>Ted:</strong> ROFL but of course!<br />
<br />
Whenever I run in to a problem with a customer, I try to use the following steps.<br />
<br />
1. Manage expectations at the beginning.  This allows you to prevent possible complications in the future by expressing what the customer should reasonably expect from the software.<br />
<br />
2. Effectively train the customer in the proper operation of the software.  Part of the training process should be the "big picture" because it allows them to see and appreciate your methods for handling the business problems in an efficient manner.<br />
<br />
3. When a customer has unrealistic expectations, it's important to explain (at a high level) why they are unrealistic.  Explain the benefits of the currently implemented method and the draw backs with their proposed method.<br />
<br />
4. When they insist on new/different functionality, you should attempt to work out a compromise that allows your existing functionality to satisfy their requirements.  Often times, a small tweak to current functionality will satisfy their requirements.<br />
<br />
5. When all else fails, the customer is always right.  If you refuse to implement the functionality they want, you run the risk of losing their business, and potentially word-of-mouth business as well.<br />
<br />
As developers, we have a responsibility to provide software that makes our customers job easier and more efficient.  We also have a responsibility to advise them of alternative methods (new to them) that would improve their efficiency.  If all else fails, be prepared to give the customer what they want.</p><div class="item_footer"><p><small><a href="http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/t-sql-tuesday-13-is-that-what-you-really">Original post</a> blogged on <a href="http://lessthandot.com/">LessThanDot</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/t-sql-tuesday-13-is-that-what-you-really#comments</comments>
			<wfw:commentRss>http://blogs.lessthandot.com/index.php/DataMgmt/?tempskin=_rss2&#38;disp=comments&#38;p=1046</wfw:commentRss>
		</item>
				<item>
			<title>Defining the details for a science fair project</title>
			<link>http://blogs.lessthandot.com/index.php/ITStudents/Assignments/defining-the-details-for-a-science-fair</link>
			<pubDate>Thu, 11 Nov 2010 20:02:47 +0000</pubDate>			<dc:creator>George Mastros (gmmastros)</dc:creator>
			<category domain="main">Assignments</category>			<guid isPermaLink="false">1011@http://blogs.lessthandot.com/</guid>
						<description>&lt;p&gt;Your child submitted ideas for her science fair project.  Her teacher approved the ideas, and the project has been picked.  What now?&lt;/p&gt;

&lt;p&gt;My daughter decided to investigate glow sticks.  More specifically, &quot;The affect of color and temperature on the longevity of glow sticks&quot;.&lt;br /&gt;
The preparation phase has 2 main components, research &amp;amp; planning.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Research&lt;/strong&gt;&lt;br /&gt;
Do not underestimate this step of the project.  It&amp;#8217;s important.  For many people these days, their idea of research is a going trip to Google.  Research can be (and should be) much more than that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Identify sources&lt;/strong&gt;&lt;br /&gt;
Researching things today is nothing like it was when I was growing up.  Today, we have access to so much information that it can seem overwhelming.  Of course, I&#039;m talking about the internet.  The problem with using the internet as a research source is that anybody can say anything and make it sound authoritative.  Don&amp;#8217;t believe everything you read!&lt;/p&gt;

&lt;p&gt;My daughter&#039;s approach was to do some preliminary research on the internet.  Google searches revealed some interesting information regarding glow sticks.  She then took a trip to the local library.  As a parent, you should encourage your child to have a discussion with the librarian.  They get information requests like this all the time, and they are good at finding information.  It&amp;#8217;s their job, let them do it.  By having a simple and brief discussion with the librarian, you are likely to find more sources of information than if you had tried to locate those sources yourself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Include interesting facts&lt;/strong&gt;&lt;br /&gt;
Interesting facts related to the project can make the final report more interesting and engaging to the reader.  Of course, the focus of the report should be the science behind the project.  That&amp;#8217;s the assignment.  Interesting facts allow the reader to consider some of the ramifications behind the project.&lt;br /&gt;
Glow sticks glow based on a chemical reaction that emits energy in the form of light.  I suggested that she include some examples of this occurring in nature.  She was one step ahead of me.  She explained that glow worms, fireflies, and certain types of algae produce the same chemical reactions as a glow stick.  She also mentioned that the efficiency of the chemical reaction in a firefly is much higher than that of a glow stick.  There are still things that scientists can learn from nature!&lt;/p&gt;

&lt;p&gt;For me, the parent, this part was simple because it represents work that my daughter must do.  Not me.  My involvement was simply to make the research materials available to her.  There was a trip to the local library, a brief discussion with the librarian, and time to read the materials.  There was additional research done on the internet, starting with Google, which led to additional sources of information. &lt;br /&gt;
After my daughter had done some research, I asked her to explain how a glow stick works.  I didn&amp;#8217;t want all the details, but a brief over view.  She explained that glow sticks glow as a result of a chemical reaction that emits energy in the form of light.  She also learned that higher temperatures should cause the glow stick to glow brighter because it increases the rate at which the chemicals react.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;br /&gt;
The research phase of the project is important for your child to learn about the science fair project topic.  As a parent, your involvement should be minimal, but supportive.  Enable your child to visit the library, and assist them in their internet research (children shouldn&amp;#8217;t be left unattended with an active internet connection).  Encourage them to include interesting facts, and make sure they form a basis for their expected outcome.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.lessthandot.com/index.php/ITStudents/Assignments/defining-the-details-for-a-science-fair&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://lessthandot.com/&quot;&gt;LessThanDot&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Your child submitted ideas for her science fair project.  Her teacher approved the ideas, and the project has been picked.  What now?</p>

<p>My daughter decided to investigate glow sticks.  More specifically, "The affect of color and temperature on the longevity of glow sticks".<br />
The preparation phase has 2 main components, research &amp; planning.  </p>

<p><strong>Step 2: Research</strong><br />
Do not underestimate this step of the project.  It&#8217;s important.  For many people these days, their idea of research is a going trip to Google.  Research can be (and should be) much more than that.</p>

<p><strong>Identify sources</strong><br />
Researching things today is nothing like it was when I was growing up.  Today, we have access to so much information that it can seem overwhelming.  Of course, I'm talking about the internet.  The problem with using the internet as a research source is that anybody can say anything and make it sound authoritative.  Don&#8217;t believe everything you read!</p>

<p>My daughter's approach was to do some preliminary research on the internet.  Google searches revealed some interesting information regarding glow sticks.  She then took a trip to the local library.  As a parent, you should encourage your child to have a discussion with the librarian.  They get information requests like this all the time, and they are good at finding information.  It&#8217;s their job, let them do it.  By having a simple and brief discussion with the librarian, you are likely to find more sources of information than if you had tried to locate those sources yourself.</p>

<p><strong>Include interesting facts</strong><br />
Interesting facts related to the project can make the final report more interesting and engaging to the reader.  Of course, the focus of the report should be the science behind the project.  That&#8217;s the assignment.  Interesting facts allow the reader to consider some of the ramifications behind the project.<br />
Glow sticks glow based on a chemical reaction that emits energy in the form of light.  I suggested that she include some examples of this occurring in nature.  She was one step ahead of me.  She explained that glow worms, fireflies, and certain types of algae produce the same chemical reactions as a glow stick.  She also mentioned that the efficiency of the chemical reaction in a firefly is much higher than that of a glow stick.  There are still things that scientists can learn from nature!</p>

<p>For me, the parent, this part was simple because it represents work that my daughter must do.  Not me.  My involvement was simply to make the research materials available to her.  There was a trip to the local library, a brief discussion with the librarian, and time to read the materials.  There was additional research done on the internet, starting with Google, which led to additional sources of information. <br />
After my daughter had done some research, I asked her to explain how a glow stick works.  I didn&#8217;t want all the details, but a brief over view.  She explained that glow sticks glow as a result of a chemical reaction that emits energy in the form of light.  She also learned that higher temperatures should cause the glow stick to glow brighter because it increases the rate at which the chemicals react.</p>

<p><strong>Summary</strong><br />
The research phase of the project is important for your child to learn about the science fair project topic.  As a parent, your involvement should be minimal, but supportive.  Enable your child to visit the library, and assist them in their internet research (children shouldn&#8217;t be left unattended with an active internet connection).  Encourage them to include interesting facts, and make sure they form a basis for their expected outcome.</p><div class="item_footer"><p><small><a href="http://blogs.lessthandot.com/index.php/ITStudents/Assignments/defining-the-details-for-a-science-fair">Original post</a> blogged on <a href="http://lessthandot.com/">LessThanDot</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.lessthandot.com/index.php/ITStudents/Assignments/defining-the-details-for-a-science-fair#comments</comments>
			<wfw:commentRss>http://blogs.lessthandot.com/index.php/ITStudents/?tempskin=_rss2&#38;disp=comments&#38;p=1011</wfw:commentRss>
		</item>
				<item>
			<title>Picking a science fair project</title>
			<link>http://blogs.lessthandot.com/index.php/ITStudents/Assignments/picking-a-science-fair-project</link>
			<pubDate>Wed, 03 Nov 2010 10:02:58 +0000</pubDate>			<dc:creator>George Mastros (gmmastros)</dc:creator>
			<category domain="main">Assignments</category>
<category domain="alt">How to Learn &amp; Get Answers</category>			<guid isPermaLink="false">996@http://blogs.lessthandot.com/</guid>
						<description>&lt;p&gt;When school started this year, my 7th grade daughter was informed that she is expected to complete a science fair project.  I plan on convincing her to post her final report as a blog on this site, but it&amp;#8217;s not scheduled to be completed for a couple more months.  I plan on writing a series of blogs outlining the steps involved from a parents&#039; perspective.  &lt;/p&gt;

&lt;div class=&quot;image_block&quot;&gt;&lt;img src=&quot;http://blogs.lessthandot.com/media/blogs/ITStudents/albert_einstein_256515.jpg&quot; alt=&quot;&quot; title=&quot;&quot; width=&quot;256&quot; height=&quot;500&quot; /&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Picking the project.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;During dinner one night, my daughter informed us that she needed to present 6 science fair project ideas to her teacher the next day, but she couldn&amp;#8217;t think of anything.  Several ideas were presented but none were acceptable. After the meal was over and the plates were clean, we turned to google for some help.  I was expecting google to present some interesting ideas, but was surprised at how many there are.  Our first google search was &quot;7th grade science fair project ideas&quot;.  There were so many ideas to choose from.&lt;/p&gt;

&lt;p&gt;When helping your child present ideas to the teacher, it&amp;#8217;s important that each idea is acceptable to you, the parent.  I&amp;#8217;m reminded of Sunday morning breakfasts when my daughter was younger.  I didn&amp;#8217;t ask &quot;What would you like for breakfast?&quot;  Instead, I would ask, &quot;Would you like pancakes, eggs, or oatmeal?&quot; By restricting the choices to those that I think are appropriate, I was guaranteed to get an acceptable answer.  The science fair project is no exception.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Safety&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I&#039;m glad that my daughter was expected to present ideas to the teacher.  This is an important safety measure that shouldn&#039;t be overlooked because it is easy for a seemingly interesting &amp;amp; safe project idea to become dangerous or malicious.  The teacher is the filter, the guardian, the safety net.  Any project involving an animal is immediately rejected, don&#039;t even bother presenting it.  If your project involves dangerous chemicals, it is likely to be rejected also.  Trust the teachers decision.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fun and interesting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The project idea is the single most important decision made.  The teacher will help make sure the project is safe, but it&#039;s your job to make sure the project is fun, interesting, and appropriate for your child.  As your child is making this decision, you should constantly be asking, is this interesting to you?  Is this something you&#039;ll enjoy doing.  Most science fair projects require a lot of time.  If your child is going to be miserable during this time, so will you.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cost&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another consideration when picking a science fair project is cost.  Some projects can be done without incurring any costs, some are low cost, and others can be expensive.  As a parent, you should have a clear understanding about the costs you are willing incur.  Some projects may initially seems like there is a low cost associated with it, only to find hidden expenses once you get in to a later phase of the project.  For example, if the science fair project is about the freshness of bread stored various ways, all you may need is a single loaf of sliced bread and perhaps a Ziploc bag, cellophane wrapping, etc&amp;#8230; These are materials you probably already have in your home, and the expense is likely to be quite small and reasonable.  Other projects have hidden costs that may surprise you.  For example, &quot;Does the bounciness of a golf ball relate to its ability to be hit a long distance?&quot;  For this project, you will need to purchase a variety of golf balls and measure it bounciness.  More importantly, you&amp;#8217;ll need a method to consistently hit each ball so that it is exactly the same strength and angle.  Building such a device may include hidden expenses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Lastly, you should consider the amount of time and level of effort that will be involved in your child&amp;#8217;s project.  Some projects will be easy to prepare for and conduct.  For example, &quot;testing the effect of music volume on your ability to remember&quot;.  All you&amp;#8217;ll really need for this is to prepare a test and get a music source, preferably with head phones.  Other projects may require more preparation time.  Also realize that it&#039;s not just preparation time that could be significant.  It may take a long time to conduct the experiment too.  For example, &quot;Fish growth as a result of tank size&quot;.  This experiment may take several months to complete.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At first glance, picking a science fair project may seem simple, but it&#039;s not.  It may be the most important decision you can make.  Guiding your child is important in order to assure an acceptable project is picked.  Remember these factors when picking a science fair project: safety, fun, cost, and time commitments.  Determine what is acceptable for you and your family and then let your child pick from several acceptable ideas.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.lessthandot.com/index.php/ITStudents/Assignments/picking-a-science-fair-project&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://lessthandot.com/&quot;&gt;LessThanDot&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>When school started this year, my 7th grade daughter was informed that she is expected to complete a science fair project.  I plan on convincing her to post her final report as a blog on this site, but it&#8217;s not scheduled to be completed for a couple more months.  I plan on writing a series of blogs outlining the steps involved from a parents' perspective.  </p>

<div class="image_block"><img src="http://blogs.lessthandot.com/media/blogs/ITStudents/albert_einstein_256515.jpg" alt="" title="" width="256" height="500" /></div><p> </p>

<p><strong>Step 1: Picking the project.</strong></p>

<p>During dinner one night, my daughter informed us that she needed to present 6 science fair project ideas to her teacher the next day, but she couldn&#8217;t think of anything.  Several ideas were presented but none were acceptable. After the meal was over and the plates were clean, we turned to google for some help.  I was expecting google to present some interesting ideas, but was surprised at how many there are.  Our first google search was "7th grade science fair project ideas".  There were so many ideas to choose from.</p>

<p>When helping your child present ideas to the teacher, it&#8217;s important that each idea is acceptable to you, the parent.  I&#8217;m reminded of Sunday morning breakfasts when my daughter was younger.  I didn&#8217;t ask "What would you like for breakfast?"  Instead, I would ask, "Would you like pancakes, eggs, or oatmeal?" By restricting the choices to those that I think are appropriate, I was guaranteed to get an acceptable answer.  The science fair project is no exception.</p>

<p><strong>Safety</strong></p>

<p>I'm glad that my daughter was expected to present ideas to the teacher.  This is an important safety measure that shouldn't be overlooked because it is easy for a seemingly interesting &amp; safe project idea to become dangerous or malicious.  The teacher is the filter, the guardian, the safety net.  Any project involving an animal is immediately rejected, don't even bother presenting it.  If your project involves dangerous chemicals, it is likely to be rejected also.  Trust the teachers decision.</p>

<p><strong>Fun and interesting</strong></p>

<p>The project idea is the single most important decision made.  The teacher will help make sure the project is safe, but it's your job to make sure the project is fun, interesting, and appropriate for your child.  As your child is making this decision, you should constantly be asking, is this interesting to you?  Is this something you'll enjoy doing.  Most science fair projects require a lot of time.  If your child is going to be miserable during this time, so will you.  </p>

<p><strong>Cost</strong></p>

<p>Another consideration when picking a science fair project is cost.  Some projects can be done without incurring any costs, some are low cost, and others can be expensive.  As a parent, you should have a clear understanding about the costs you are willing incur.  Some projects may initially seems like there is a low cost associated with it, only to find hidden expenses once you get in to a later phase of the project.  For example, if the science fair project is about the freshness of bread stored various ways, all you may need is a single loaf of sliced bread and perhaps a Ziploc bag, cellophane wrapping, etc&#8230; These are materials you probably already have in your home, and the expense is likely to be quite small and reasonable.  Other projects have hidden costs that may surprise you.  For example, "Does the bounciness of a golf ball relate to its ability to be hit a long distance?"  For this project, you will need to purchase a variety of golf balls and measure it bounciness.  More importantly, you&#8217;ll need a method to consistently hit each ball so that it is exactly the same strength and angle.  Building such a device may include hidden expenses.</p>

<p><strong>Time</strong></p>

<p>Lastly, you should consider the amount of time and level of effort that will be involved in your child&#8217;s project.  Some projects will be easy to prepare for and conduct.  For example, "testing the effect of music volume on your ability to remember".  All you&#8217;ll really need for this is to prepare a test and get a music source, preferably with head phones.  Other projects may require more preparation time.  Also realize that it's not just preparation time that could be significant.  It may take a long time to conduct the experiment too.  For example, "Fish growth as a result of tank size".  This experiment may take several months to complete.</p>

<p><strong>Summary</strong></p>

<p>At first glance, picking a science fair project may seem simple, but it's not.  It may be the most important decision you can make.  Guiding your child is important in order to assure an acceptable project is picked.  Remember these factors when picking a science fair project: safety, fun, cost, and time commitments.  Determine what is acceptable for you and your family and then let your child pick from several acceptable ideas.</p><div class="item_footer"><p><small><a href="http://blogs.lessthandot.com/index.php/ITStudents/Assignments/picking-a-science-fair-project">Original post</a> blogged on <a href="http://lessthandot.com/">LessThanDot</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.lessthandot.com/index.php/ITStudents/Assignments/picking-a-science-fair-project#comments</comments>
			<wfw:commentRss>http://blogs.lessthandot.com/index.php/ITStudents/?tempskin=_rss2&#38;disp=comments&#38;p=996</wfw:commentRss>
		</item>
			</channel>
</rss>
