﻿<?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 Articles tagged T-SQL, SQL Puzzles</title><link>http://www.sqlservercentral.com/</link><description>Articles 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>Just For Fun: An Impossible Delete</title><description>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?</description><guid>http://www.sqlservercentral.com/articles/T-SQL/63578/</guid><pubDate>2008/08/05</pubDate><link>http://www.sqlservercentral.com/articles/T-SQL/63578/</link></item><item><title>Eliminating Cursors</title><description>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.


</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/eliminatingcursors/2223/</guid><pubDate>2008/06/13</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/eliminatingcursors/2223/</link></item><item><title>The T-SQL Quiz</title><description>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.
</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/2973/</guid><pubDate>2008/05/01</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/2973/</link></item><item><title>Full Control Over a Randomly Generated Password</title><description>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.

</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/2878/</guid><pubDate>2008/02/25</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/2878/</link></item><item><title>Finding Primes</title><description>While it&amp;#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.

</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/2782/</guid><pubDate>2008/01/01</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>A SQL puzzle from the SQL guru.</description><guid>http://www.sqlservercentral.com/redirect/articles/3232/</guid><pubDate>2007/09/14</pubDate><link>http://www.sqlservercentral.com/redirect/articles/3232/</link></item><item><title>A Raffle Puzzle</title><description>An interesting puzzle from the Orlando SQL Server Users Group</description><guid>http://www.sqlservercentral.com/redirect/articles/3150/</guid><pubDate>2007/08/13</pubDate><link>http://www.sqlservercentral.com/redirect/articles/3150/</link></item><item><title>The GO Command and the Semicolon Terminator</title><description>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.

</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/thegocommandandthesemicolonterminator/2200/</guid><pubDate>2007/06/15</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/thegocommandandthesemicolonterminator/2200/</link></item><item><title>The T-SQL Quiz</title><description>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.
</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/2973/</guid><pubDate>2008/05/01</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/2973/</link></item><item><title>SQLChess - A tutorial on thinking in sets</title><description>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.</description><guid>http://www.sqlservercentral.com/redirect/articles/3008/</guid><pubDate>2007/05/21</pubDate><link>http://www.sqlservercentral.com/redirect/articles/3008/</link></item><item><title>Full Control Over a Randomly Generated Password</title><description>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.

</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/2878/</guid><pubDate>2008/02/25</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>For those times when you absolutely, positively got to perform a cross tab query in SQL, Keith Fletcher&amp;#39;s T-SQL stored procedure will allow you to do it &amp;#34;on the fly&amp;#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.</description><guid>http://www.sqlservercentral.com/redirect/articles/2949/</guid><pubDate>2007/04/11</pubDate><link>http://www.sqlservercentral.com/redirect/articles/2949/</link></item><item><title>Finding Primes</title><description>While it&amp;#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.

</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/2782/</guid><pubDate>2008/01/01</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/2782/</link></item><item><title>Eliminating Cursors</title><description>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.


</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/eliminatingcursors/2223/</guid><pubDate>2008/06/13</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/eliminatingcursors/2223/</link></item><item><title>SQL 2000 DBA Toolkit Part 4</title><description>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.

</description><guid>http://www.sqlservercentral.com/articles/Administering/sql2000dbatoolkitpart4/2364/</guid><pubDate>2006/05/04</pubDate><link>http://www.sqlservercentral.com/articles/Administering/sql2000dbatoolkitpart4/2364/</link></item><item><title>SQL 2000 DBA Toolkit Part 3</title><description>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.

</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/sql2000dbatoolkitpart3/2363/</guid><pubDate>2006/04/27</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/sql2000dbatoolkitpart3/2363/</link></item><item><title>Triggers to Execute in Pre Defined Order</title><description>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.
</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/triggerstoexecuteinpredefinedorder/2337/</guid><pubDate>2006/04/06</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/triggerstoexecuteinpredefinedorder/2337/</link></item><item><title>Finding Gaps in a Sequential Number Sequence</title><description>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.
</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/findinggapsinasequentialnumbersequence/2336/</guid><pubDate>2006/04/03</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/findinggapsinasequentialnumbersequence/2336/</link></item><item><title>The Dodgy GO Statement</title><description>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.
</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/thedodgygostatement/2276/</guid><pubDate>2006/02/21</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/thedodgygostatement/2276/</link></item><item><title>Practical Uses of PatIndex</title><description>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.
</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/practicalusesofpatindex/2236/</guid><pubDate>2006/02/06</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/practicalusesofpatindex/2236/</link></item><item><title>Eliminating Cursors</title><description>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.


</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/eliminatingcursors/2223/</guid><pubDate>2008/06/13</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/eliminatingcursors/2223/</link></item><item><title>Working With System Tables</title><description>It&amp;#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.


</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/workingwithsystemtables/2212/</guid><pubDate>2006/01/16</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/workingwithsystemtables/2212/</link></item><item><title>The GO Command and the Semicolon Terminator</title><description>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.

</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/thegocommandandthesemicolonterminator/2200/</guid><pubDate>2007/06/15</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/thegocommandandthesemicolonterminator/2200/</link></item><item><title>Outer Join Trouble</title><description>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.
</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/outerjointrouble/2226/</guid><pubDate>2006/01/05</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/outerjointrouble/2226/</link></item><item><title>Male, Female and The Other One (NULL)</title><description>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.
</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/malefemaleandtheotheronenull/2194/</guid><pubDate>2005/12/28</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/malefemaleandtheotheronenull/2194/</link></item><item><title>SET ROWCOUNT and TVFs</title><description>SQL Server 2000 has table valued functions that are very useful in many ways. However when you try to limit results with the ROWCOUNT setting, you can end up with some strange results. Peter He brings us a comprehensive look at some of the unpredictable results that you can get and how to code around them.

</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/setrowcountandtvf/2198/</guid><pubDate>2005/12/21</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/setrowcountandtvf/2198/</link></item><item><title>Quick Hints for using the RAISERROR Command</title><description>SQL Server 2000 error handling isn&amp;#39;t the most mature system for dealing with unexpected events. It has been much enhanced in SQL Server 2005, but many people will be using SQL Server 2000 for a long time. RAISERROR is one of those functions that can really aid in troubleshooting, but is often underutilized. David Poole brings us some hints on how this can help you out in your code.
</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/quickhintsforusingtheraiserrorcommand/2114/</guid><pubDate>2005/11/23</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/quickhintsforusingtheraiserrorcommand/2114/</link></item><item><title>Reporting a menu structure using a recursive UDF</title><description>Selecting a menu structure from a series of tables is pretty easy. If you bound the number of levels in the menu. However if you have potentially variable numbers of levels. Stephen Lasham brings us a new piece on using recursion to select the data.
</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/reportingamenustructureusingarecursiveudf/2072/</guid><pubDate>2005/10/11</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/reportingamenustructureusingarecursiveudf/2072/</link></item><item><title>An Audit Trail Generator</title><description>Auditing is becoming more and more important in many SQL Server environments. DBAs are being tasked with setting up, maintaining, and reporting on audit data. Author Leo Peysakhovich brings us one of his solutions to automatically generate an audit trail for your data.
</description><guid>http://www.sqlservercentral.com/articles/SQL+Puzzles/anaudittrailgenerator/2067/</guid><pubDate>2005/10/10</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Puzzles/anaudittrailgenerator/2067/</link></item><item><title>Dynamic SQL or Stored Procedure</title><description>We&amp;#39;ve had a lot of coverage of dynamic sql (including another great one from Robert Marda later this week) but this one is a little different. Done in a question/answer format, Andy tries to explain to junior developers why dynamic sql is to be avoided, how to do so, what to do when you can&amp;#39;t.


</description><guid>http://www.sqlservercentral.com/articles/Performance+Tuning/dynamicsqlorstoredprocedure/969/</guid><pubDate>2005/08/26</pubDate><link>http://www.sqlservercentral.com/articles/Performance+Tuning/dynamicsqlorstoredprocedure/969/</link></item></channel></rss>