﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="2.0"><channel><title>SQLServerCentral.com Content tagged T-SQL, SQL Puzzles</title><link>http://www.sqlservercentral.com/</link><description>Content tagged T-SQL, SQL Puzzles posted on SQLServerCentral.com</description><language>en-us</language><ttl>360</ttl><managingEditor>sjones@sqlservercentral.com (Steve Jones)</managingEditor><item><title>The SQL of Scrabble and Rapping</title><description><![CDATA[<p>In which Phil decides to use a table consisting of all the common words in English to explore ways of cheating at Scrabble and writing doggerel using SQL Server. He then issues a SQL challenge.</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/69155/</guid><pubDate>Wed, 30 Dec 2009 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/69155/</link></item><item><title>Just For Fun: An Impossible Delete</title><description><![CDATA[<p>How can you delete only some duplicates?  Without Identity's, Temp tables, Cursors, loops or ROW_NUMBER()?  Would you believe, go back to the 70's?</p><!-- 15 seconds (SQL Monitor) -->
<table border="0" cellpadding="0" cellspacing="10" style="width: 100%;"> <colgroup>  <col width="68" />  <col width="1266" /> </colgroup> <tbody>  <tr align="left" valign="top">   <td>    <a href="http://www.red-gate.com/products/dba/sql-monitor/entrypage/custom-metrics?utm_source=ssc&utm_medium=pubad&utm_content=15_seconds&utm_campaign=sqlmonitor&utm_term=rss-20017"><img src="http://assets.red-gate.com/external/SSC/monitor_ico.gif" alt="sqlmonitor"></td>   <td><strong>Get alerts within 15 seconds of SQL Server issues</strong><br />SQL Monitor checks performance data every 15 seconds, so you can fix issues before your users even notice them.  <a href="http://www.red-gate.com/products/dba/sql-monitor/entrypage/custom-metrics?utm_source=ssc&utm_medium=pubad&utm_content=15_seconds&utm_campaign=sqlmonitor&utm_term=rss-20017">Start monitoring with a free trial.</a></td>  </tr> </tbody></table>


]]></description><guid>http://www.sqlservercentral.com/articles/T-SQL/63578/</guid><pubDate>Fri, 30 Oct 2009 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/T-SQL/63578/</link></item><item><title>Celko's SQL Stumper: The Data Warehouse Problem</title><description><![CDATA[<p>Joe Celko comes back with a puzzle that isn't new, but one where the answer he originally gave now seems archaic: It is a deceptively simple problem, but is it true that the new features of SQL have simplified the solution? We leave it to the readers to provide the answer! </p><!-- 12 Tools (SQL Dev Bundle)-->
<table border="0" cellpadding="0" cellspacing="10" style="width: 100%;"> <colgroup>  <col width="68" />  <col width="1266" /> </colgroup> <tbody>  <tr align="left" valign="top">   <td>    <a href="http://www.red-gate.com/products/sql-development/sql-developer-bundle/?utm_source=ssc&utm_medium=pubad&utm_content=12_tools&utm_campaign=sqldeveloperbundle&utm_term=rss-20013"><img src="http://assets.red-gate.com/external/SSC/devbundle_68x68.gif" alt="sqldeveloperbundle"></td>   <td><strong>12 essential tools for database professionals</strong><br />The SQL Developer Bundle contains 12 tools designed with the SQL Server developer and DBA in mind.  <a href="http://www.red-gate.com/products/sql-development/sql-developer-bundle/?utm_source=ssc&utm_medium=pubad&utm_content=12_tools&utm_campaign=sqldeveloperbundle&utm_term=rss-20013">Try it now.</a></td>  </tr> </tbody></table>


]]></description><guid>http://www.sqlservercentral.com/articles/T-SQL/Celkos+Data+Warehouse+problem/68297/</guid><pubDate>Mon, 28 Sep 2009 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/T-SQL/Celkos+Data+Warehouse+problem/68297/</link></item><item><title>Celko's Summer SQL Stumpers: Prime numbers</title><description><![CDATA[<p>Our first Stumper sees Joe Celko providing a conundrum with a prize for anyone who can come up with a better solution than he can.</p>]]></description><guid>http://www.sqlservercentral.com/articles/T-SQL/67666/</guid><pubDate>Mon, 27 Jul 2009 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/T-SQL/67666/</link></item><item><title>Just For Fun: An Impossible Delete</title><description><![CDATA[<p>How can you delete only some duplicates?  Without Identity's, Temp tables, Cursors, loops or ROW_NUMBER()?  Would you believe, go back to the 70's?</p>]]></description><guid>http://www.sqlservercentral.com/articles/T-SQL/63578/</guid><pubDate>Fri, 30 Oct 2009 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/T-SQL/63578/</link></item><item><title>Eliminating Cursors</title><description><![CDATA[<p>T-SQL does some things wonderfully, but cursors are the bane of the language, often causing performance issues. Changing your queries around to remove cursors can be tricky and new author Kamran Ali brings us one technique he has used to dramatically improve performance.


</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/eliminatingcursors/2223/</guid><pubDate>Fri, 13 Jun 2008 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/eliminatingcursors/2223/</link></item><item><title>Delete Duplicates</title><description><![CDATA[<p></p>]]></description><guid>http://www.sqlservercentral.com/questions/T-SQL/62798/</guid><pubDate>Tue, 13 May 2008 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/questions/T-SQL/62798/</link></item><item><title>The T-SQL Quiz</title><description><![CDATA[<p>Longtime SQL Server DBA and author Grant Fritchey decided to quiz his developers on how to perform some simple functions in T-SQL. Read about his results and see how you might do in taking his quiz.
</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/2973/</guid><pubDate>Thu, 01 May 2008 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/2973/</link></item><item><title>Full Control Over a Randomly Generated Password</title><description><![CDATA[<p>All of us need a steady stream of random passwords for the various systems we manage. Peter Larsson brings us an interesting T-SQL solution that generates one for us.

</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/2878/</guid><pubDate>Mon, 25 Feb 2008 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/2878/</link></item><item><title>Finding Primes</title><description><![CDATA[<p>While it&#39;s not likely that many of you need to find prime numbers using T-SQL, it is an interesting programming exercise. SQL Server guru Kathi Kellenburger brings us one solution after taking a break over the holidays and reading some popular fiction.

</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/2782/</guid><pubDate>Tue, 01 Jan 2008 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/2782/</link></item><item><title>Celko's 'Can't Be Your Own Supervisor' SQL Puzzle </title><description><![CDATA[<p>A SQL puzzle from the SQL guru.</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/3232/</guid><pubDate>Fri, 14 Sep 2007 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/3232/</link></item><item><title>A Raffle Puzzle</title><description><![CDATA[<p>An interesting puzzle from the Orlando SQL Server Users Group</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/3150/</guid><pubDate>Mon, 13 Aug 2007 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/3150/</link></item><item><title>The GO Command and the Semicolon Terminator</title><description><![CDATA[<p>There are probably not many SQL Server DBAs that use the semicolon as a statement separator. In SQL Server 2005, this is required in certain places and new author Kenneth Powers brings us a look at where and why you need to use this syntax.

</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/thegocommandandthesemicolonterminator/2200/</guid><pubDate>Fri, 15 Jun 2007 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/thegocommandandthesemicolonterminator/2200/</link></item><item><title>The T-SQL Quiz</title><description><![CDATA[<p>Longtime SQL Server DBA and author Grant Fritchey decided to quiz his developers on how to perform some simple functions in T-SQL. Read about his results and see how you might do in taking his quiz.
</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/2973/</guid><pubDate>Thu, 01 May 2008 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/2973/</link></item><item><title>SQLChess - A tutorial on thinking in sets</title><description><![CDATA[<p>Chess makes a fantastic game for programming examples. You will find hundreds of examples on the internet. Some dedicated to OO patterns, others to algorithms and so forth. Unfortunately, most of these examples do not use a database or if they do, treat the database as nothing more than a storage repository. In this series of articles we will use SQL Server and T-SQL to implement the game of chess with an emphasis on thinking in sets.</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/3008/</guid><pubDate>Mon, 21 May 2007 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/3008/</link></item><item><title>Full Control Over a Randomly Generated Password</title><description><![CDATA[<p>All of us need a steady stream of random passwords for the various systems we manage. Peter Larsson brings us an interesting T-SQL solution that generates one for us.

</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/2878/</guid><pubDate>Mon, 25 Feb 2008 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/2878/</link></item><item><title>Creating cross tab queries and pivot tables in SQL</title><description><![CDATA[<p>For those times when you absolutely, positively got to perform a cross tab query in SQL, Keith Fletcher&#39;s T-SQL stored procedure will allow you to do it &#34;on the fly&#34;. You can add it to your database and start cross tabbing immediately, without any further setup or changes to you SQL code. Check it out, and then take the cross tab challenge.</p><!-- 15 seconds (SQL Monitor) -->
<table border="0" cellpadding="0" cellspacing="10" style="width: 100%;"> <colgroup>  <col width="68" />  <col width="1266" /> </colgroup> <tbody>  <tr align="left" valign="top">   <td>    <a href="http://www.red-gate.com/products/dba/sql-monitor/entrypage/custom-metrics?utm_source=ssc&utm_medium=pubad&utm_content=15_seconds&utm_campaign=sqlmonitor&utm_term=rss-20017"><img src="http://assets.red-gate.com/external/SSC/monitor_ico.gif" alt="sqlmonitor"></td>   <td><strong>Get alerts within 15 seconds of SQL Server issues</strong><br />SQL Monitor checks performance data every 15 seconds, so you can fix issues before your users even notice them.  <a href="http://www.red-gate.com/products/dba/sql-monitor/entrypage/custom-metrics?utm_source=ssc&utm_medium=pubad&utm_content=15_seconds&utm_campaign=sqlmonitor&utm_term=rss-20017">Start monitoring with a free trial.</a></td>  </tr> </tbody></table>


]]></description><guid>http://www.sqlservercentral.com/redirect/articles/2949/</guid><pubDate>Wed, 11 Apr 2007 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/2949/</link></item><item><title>Finding Primes</title><description><![CDATA[<p>While it&#39;s not likely that many of you need to find prime numbers using T-SQL, it is an interesting programming exercise. SQL Server guru Kathi Kellenburger brings us one solution after taking a break over the holidays and reading some popular fiction.

</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/2782/</guid><pubDate>Tue, 01 Jan 2008 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/2782/</link></item><item><title>Eliminating Cursors</title><description><![CDATA[<p>T-SQL does some things wonderfully, but cursors are the bane of the language, often causing performance issues. Changing your queries around to remove cursors can be tricky and new author Kamran Ali brings us one technique he has used to dramatically improve performance.


</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/eliminatingcursors/2223/</guid><pubDate>Fri, 13 Jun 2008 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/eliminatingcursors/2223/</link></item><item><title>SQL 2000 DBA Toolkit Part 4</title><description><![CDATA[<p>In the final installment of his series, Michael Coles examines a few other functions in his SQL Server 2000 toolkit to help you with other functions, like reading a directory on your server. Read the series and send some feedback to make this THE premier toolset for SQL Server 2000 DBAs.

</p>]]></description><guid>http://www.sqlservercentral.com/articles/Administration/sql2000dbatoolkitpart4/2364/</guid><pubDate>Thu, 04 May 2006 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/Administration/sql2000dbatoolkitpart4/2364/</link></item><item><title>SQL 2000 DBA Toolkit Part 3</title><description><![CDATA[<p>Phonetic matching, working on finding terms that are misspelled, is an art and there are a number of ways to handle it. In SQL Server 2000 the tools are limited, but Michael Coles brings us part 3 of his toolkit with some handy functions that can help you with text searching.

</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/sql2000dbatoolkitpart3/2363/</guid><pubDate>Thu, 27 Apr 2006 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/sql2000dbatoolkitpart3/2363/</link></item><item><title>Triggers to Execute in Pre Defined Order</title><description><![CDATA[<p>SQL Server allows multiple triggers on a table, but the order in which they are executed can sometimes cause problems. Author Dinesh Asanka brings us a technique for managing the order of execution for your triggers.
</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/triggerstoexecuteinpredefinedorder/2337/</guid><pubDate>Thu, 06 Apr 2006 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/triggerstoexecuteinpredefinedorder/2337/</link></item><item><title>Finding Gaps in a Sequential Number Sequence</title><description><![CDATA[<p>Do you use identity values? Do missing values ever cause problems? Maybe you need to look for missing invoices? Stephen Lasham brings us a technique for finding those missing values in a sequence.
</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/findinggapsinasequentialnumbersequence/2336/</guid><pubDate>Mon, 03 Apr 2006 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/findinggapsinasequentialnumbersequence/2336/</link></item><item><title>The Dodgy GO Statement</title><description><![CDATA[<p>Do you really understand what happens when you create a stored procedure? What if you have some extra code in your batch? This is an interesting article that shows an interesting effect of creating a stored procedure and where your GO statement is placed.
</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/thedodgygostatement/2276/</guid><pubDate>Tue, 21 Feb 2006 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/thedodgygostatement/2276/</link></item><item><title>Practical Uses of PatIndex</title><description><![CDATA[<p>String manipulation is not one of the strong points of T-SQL, but there are some functions that can greatly assist you with searching and working with character values. New author Robert Davis brings us a look at PATINDEX, one of the search functions and also explains the differences between it and the often used CHARINDEX.
</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/practicalusesofpatindex/2236/</guid><pubDate>Mon, 06 Feb 2006 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/practicalusesofpatindex/2236/</link></item><item><title>Eliminating Cursors</title><description><![CDATA[<p>T-SQL does some things wonderfully, but cursors are the bane of the language, often causing performance issues. Changing your queries around to remove cursors can be tricky and new author Kamran Ali brings us one technique he has used to dramatically improve performance.


</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/eliminatingcursors/2223/</guid><pubDate>Fri, 13 Jun 2008 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/eliminatingcursors/2223/</link></item><item><title>Working With System Tables</title><description><![CDATA[<p>It&#39;s not recommended, but sometimes writing scripts against the system tables and getting information is a great way to work with SQL Server. Alex Grinberg brings us a look at some of the things you can get from system tables along with some sample scripts.


</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/workingwithsystemtables/2212/</guid><pubDate>Mon, 16 Jan 2006 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/workingwithsystemtables/2212/</link></item><item><title>The GO Command and the Semicolon Terminator</title><description><![CDATA[<p>There are probably not many SQL Server DBAs that use the semicolon as a statement separator. In SQL Server 2005, this is required in certain places and new author Kenneth Powers brings us a look at where and why you need to use this syntax.

</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/thegocommandandthesemicolonterminator/2200/</guid><pubDate>Fri, 15 Jun 2007 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/thegocommandandthesemicolonterminator/2200/</link></item><item><title>Outer Join Trouble</title><description><![CDATA[<p>Writing outer joins can be more difficult than it appears at first glance. Steve Jones examines this less often used query technique and brings to light a few places where you can lose data.
</p><!-- 12 Tools (SQL Dev Bundle)-->
<table border="0" cellpadding="0" cellspacing="10" style="width: 100%;"> <colgroup>  <col width="68" />  <col width="1266" /> </colgroup> <tbody>  <tr align="left" valign="top">   <td>    <a href="http://www.red-gate.com/products/sql-development/sql-developer-bundle/?utm_source=ssc&utm_medium=pubad&utm_content=12_tools&utm_campaign=sqldeveloperbundle&utm_term=rss-20013"><img src="http://assets.red-gate.com/external/SSC/devbundle_68x68.gif" alt="sqldeveloperbundle"></td>   <td><strong>12 essential tools for database professionals</strong><br />The SQL Developer Bundle contains 12 tools designed with the SQL Server developer and DBA in mind.  <a href="http://www.red-gate.com/products/sql-development/sql-developer-bundle/?utm_source=ssc&utm_medium=pubad&utm_content=12_tools&utm_campaign=sqldeveloperbundle&utm_term=rss-20013">Try it now.</a></td>  </tr> </tbody></table>


]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/outerjointrouble/2226/</guid><pubDate>Thu, 05 Jan 2006 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/outerjointrouble/2226/</link></item><item><title>Male, Female and The Other One (NULL)</title><description><![CDATA[<p>When programming in T-SQL, the impact of NULL values can be severe in many cases, especially aggregates. New Author Peter Ward brings us a great explanation on how NULLs can impact things like SUM operations.
</p><!-- Breeze (SQL Prompt) -->
<table border="0" cellpadding="0" cellspacing="10" style="width: 100%;"> <colgroup>  <col width="68" />  <col width="1266" /> </colgroup> <tbody>  <tr align="left" valign="top">   <td>    <a href="http://www.red-gate.com/products/sql-development/sql-prompt/entrypage/effortlessly?utm_source=ssc&utm_medium=pubad&utm_content=breeze&utm_campaign=sqlprompt&utm_term=rss-20015"><img src="http://assets.red-gate.com/external/SSC/Prompt_68.gif" alt="sqlprompt"></td>   <td><strong>Make working with SQL a breeze</strong><br />SQL Prompt 5 is the effortless way to write, edit, and explore SQL. It's packed with features such as code completion, script summaries, and SQL reformatting, that make working with SQL a breeze.  <a href="http://www.red-gate.com/products/sql-development/sql-prompt/entrypage/effortlessly?utm_source=ssc&utm_medium=pubad&utm_content=breeze&utm_campaign=sqlprompt&utm_term=rss-20015">Try it now.</a></td>  </tr> </tbody></table>
]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/malefemaleandtheotheronenull/2194/</guid><pubDate>Wed, 28 Dec 2005 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/malefemaleandtheotheronenull/2194/</link></item></channel></rss>