Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Content with tags T-SQL, SQL Puzzles Rss

<< Newer    Items 21 to 40 of 44    Older >>
 

SQL 2000 DBA Toolkit Part 3

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.   Read more...
By Michael Coles 2006/04/27 | Source: SQLServerCentral.com | Category: sql puzzles
Rating: |  Discuss |   Briefcase | 15,911 reads

Triggers to Execute in Pre Defined Order

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.   Read more...
By Dinesh Asanka 2006/04/06 | Source: SQLServerCentral.com | Category: sql puzzles
Rating: |  Discuss |   Briefcase | 10,879 reads

Finding Gaps in a Sequential Number Sequence

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.   Read more...
By Stephen Lasham 2006/04/03 | Source: SQLServerCentral.com | Category: sql puzzles
Rating: |  Discuss |   Briefcase | 13,096 reads

The Dodgy GO Statement

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.   Read more...
By Subramanyam Krishnamurthy 2006/02/21 | Source: SQLServerCentral.com | Category: sql puzzles
Rating: |  Discuss |   Briefcase | 11,471 reads

Practical Uses of PatIndex

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.   Read more...
By Robert Davis 2006/02/06 | Source: SQLServerCentral.com | Category: sql puzzles
Rating: |  Discuss |   Briefcase | 19,526 reads

Eliminating Cursors

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.   Read more...
By Kamran Ali 2008/06/13 (first published: 2006/01/17) | Source: SQLServerCentral.com | Category: sql puzzles
Rating: |  Discuss |   Briefcase | 54,289 reads

Working With System Tables

It'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.   Read more...
By Alex Grinberg 2006/01/16 | Source: SQLServerCentral.com | Category: sql puzzles
Rating: |  Discuss |   Briefcase | 14,402 reads

The GO Command and the Semicolon Terminator

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.   Read more...
By Ken Powers 2007/06/15 (first published: 2006/01/09) | Source: SQLServerCentral.com | Category: sql puzzles
Rating: |  Discuss |   Briefcase | 40,147 reads

Outer Join Trouble

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.   Read more...
By Steve Jones 2006/01/05 | Source: SQLServerCentral.com | Category: sql puzzles
Rating: |  Discuss |   Briefcase | 18,420 reads

Male, Female and The Other One (NULL)

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.   Read more...
By Peter Ward 2005/12/28 | Source: SQLServerCentral.com | Category: sql puzzles
Rating: |  Discuss |   Briefcase | 9,641 reads

SET ROWCOUNT and TVFs

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.   Read more...
By Peter He 2005/12/21 | Source: SQLServerCentral.com | Category: sql puzzles
Rating: |  Discuss |   Briefcase | 9,995 reads

Quick Hints for using the RAISERROR Command

SQL Server 2000 error handling isn'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.   Read more...
By David Poole 2005/11/23 | Source: SQLServerCentral.com | Category: sql puzzles
Rating: |  Discuss |   Briefcase | 18,546 reads

Reporting a menu structure using a recursive UDF

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.   Read more...
By Stephen Lasham 2005/10/11 | Source: SQLServerCentral.com | Category: sql puzzles
Rating: |  Discuss |   Briefcase | 8,521 reads

An Audit Trail Generator

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.   Read more...
By Leo Peysakhovich 2005/10/10 | Source: SQLServerCentral.com | Category: sql puzzles
Rating: |  Discuss |   Briefcase | 22,395 reads

Dynamic SQL or Stored Procedure

We'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't.   Read more...
By Andy Warren 2005/08/26 (first published: 2003/04/23) | Source: SQLServerCentral.com | Category: performance tuning
Rating: |  Discuss |   Briefcase | 47,239 reads

All About Transactions - Part 2

Transactions in SQL Server can be very complicated, and are often misunderstood. Don Peterson brings us part 2 of his series on transactions. This part deals with XACT_ABORT, compilation errors and error handling in transactions.   Read more...
By Don Peterson 2004/11/24 | Source: SQLServerCentral.com | Category: sql puzzles
Rating: |  Discuss |   Briefcase | 18,370 reads

The Bowling Challenge

Know anything about bowling? Or writing hard core TSQL? Or test driven development? Even if you don't, this might be a good way to build those skills. Write a stored procedure that can score a bowling game and you might win one of our books and a shirt!   Read more...
By Andy Warren 2004/07/22 | Source: SQLServerCentral.com | Category: miscellaneous
Rating: |  Discuss |   Briefcase | 9,200 reads

An Is Null Gotcha

In T-SQL you should use the IS NULL keywords to test for a null value. But David Poole runs into a strange gotcha in one of his applications where he is testing for a null value. It's an interesting read following Sherlock Poole around on his hunt to find an error.   Read more...
By David Poole 2004/07/14 | Source: SQLServerCentral.com | Category: sql puzzles
Rating: |  Discuss |   Briefcase | 11,676 reads

It Cant be Done with SQL

New Author! This is a great walkthrough that starts out with a description of the problem and goes all the way to the solution - all using TSQL.   Read more...
By Cade Bryant 2003/10/30 | Source: SQLServerCentral.com | Category: miscellaneous
Rating: |  Discuss |   Briefcase | 12,103 reads

Dynamic SQL or Stored Procedure

We'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't.   Read more...
By Andy Warren 2005/08/26 (first published: 2003/04/23) | Source: SQLServerCentral.com | Category: performance tuning
Rating: |  Discuss |   Briefcase | 47,239 reads
<< Newer    Items 21 to 40 of 44    Older >>
 
Tags
advanced querying (3)    
miscellaneous (3)    
programming (3)    
administration (2)    
ado (1)    
joe celko (1)    
performance tuning (1)    
puzzle (1)    
security (1)    
sql server 7 (1)    
stored procedures (1)    
strategies (1)