External Article

Using a Subquery in a T-SQL Statement

Sometimes the criteria for determining which set of records will be affected by a SELECT, UPDATE, DELETE and/or INSERT statement cannot be obtained by hard coding the selection criteria. Occasionally there is a need to use the results of a SELECT statement to help determine which records are returned or are affected by a T-SQL statement. When a SELECT statement is used inside another statement, the inside SELECT statement is known as a subquery. Subqueries can help to dynamically control the records affected by an UPDATE, DELETE or INSERT statement, as well as to help determine the records that will be returned by a SELECT statement. This article will show different examples of how to use a subquery to help clarify the records affected or selected by a T-SQL statement.

SQLServerCentral Article

Monitoring Blocks

SQL Server excels at quickly acquiring and releasing locks to allow as much concurrency as possible on the server. However there are times that one user will block another, which can be a source of great user frustration as well as making the system appear to be slow. Leo Peysakhovich brings us some great information and code on how you can monitor and deal with blocking on your SQL Server 2000 server.

External Article

Full Text Search on SQL 2000 Part 3

In the previous month's articles, Full Text Searching was introduced as a way to query strings with more refinement than the usual TSQL "like" or equal operator statements. With Full Text Searching, a new file system structure is created, storing key words from selected fields into Catalogs. In addition to storing typical character fields from databases, Microsoft Office documents that have been saved as binaries can also be entered into the Catalogs. In this month's edition, we will begin with the maintenance issues required to keep these Catalogs current. Once created, these catalogs can be interrogated for key words that are near each other's proximity, the singular and plural versions of a word, or the noun and verb variations of a word. In addition, search result rankings, or weights, that usually accompany internet search engine returns can also be requested.

External Article

Rebuilding SQL Server Cluster Nodes

Active/Passive SQL Server 2000 clustering gives more reliability and fault tolerance to Production SQL Server environments. When a failure occurs, all of the resources fail over from the active node to the passive node and make the passive node active. This article explains how to rebuild the node that failed and attach it back to the cluster.

SQLServerCentral Article

Optimizer Join Methods

Understanding the different types of joins used by the optimizer will help developers and DBAs understand how the optimizer is routing their queries. Developers often create queries without knowing that it would only take a few tweaks to produce an execution plan that utilizes one optimizer join method over another. These small tweaks can have dramatic effects on the optimization of the query and the ultimate satisfaction of the query by the end-users.

External Article

Full Text Search on SQL 2000 Part 2

In last month's article, Full Text Searching was introduced as a way to query strings with more refinement than the usual TSQL "like" or equal operator statements. With Full Text Searching, a new file system structure is created, storing key words from selected fields into Catalogs. In addition to storing typical character fields from databases, Microsoft Office documents that have been saved as binaries can also be entered into the Catalogs. Once created, these catalogs can be interrogated for key words that are near each other's proximity, the singular and plural versions of a word, or the noun and verb variations of a word can all be searched for. In addition, search result rankings, or weights, that usually accompany internet search engine returns can also be requested.

Technical Article

SQL Server 2005 T-SQL Enhancements

SQL Server 2005 or "Yukon" is going to be a major SQL Server update containing updates to nearly every facet of the program, including T-SQL. In this article I am going to explore some of the new T-SQL features, commands, and capabilities in SQL Server 2005. Because covering everything new in T-SQL would require an entire chapter in a book, I am going to cover some of the more useful and mainstream enhancements.

SQLServerCentral Article

Freeware: SQL Digger 1.0

Ever been in the situation where you know that you used a function in a stored procedure and couldn't remember how to use it? SQL Server is a great database platform, but it's easy to lose track of all your code as an application grows. A new freeware utility is available to help you search your databases for code.

SQLServerCentral Article

Generating a Bar Code

SQL Server is asked to do many tasks, including scheduling processes, transferring data using DTS in an ETL process, sending mail, updating other systems, generating reports and more. However this one might a bit unsual: using SQL Server and T-SQL to generate a bar code. Ivaca Masar brings us this unique look at how you can stretch the limits of T-SQL.

Blogs

The Book of Redgate: Spread across the world

By

This was Redgate in 2010, spread across the globe. First the EU/US Here’s Asia...

Merry Christmas

By

Today is Christmas and while I do not expect anybody to actual be reading...

Self-Hosting a Photo Server the Whole Family Can Use

By

Until recently, my family's 90,000+ photos have been hidden away in the depths of...

Read the latest Blogs

Forums

Happy Holidays, Let's Do Nerdy Stuff

By Grant Fritchey

Comments posted to this topic are about the item Happy Holidays, Let's Do Nerdy...

UNISTR Escape

By Steve Jones - SSC Editor

Comments posted to this topic are about the item UNISTR Escape

Celebrating Tomorrow

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Celebrating Tomorrow

Visit the forum

Question of the Day

UNISTR Escape

In SQL Server 2025, I run this command:

SELECT UNISTR('*3041*308A*304C\3068 and good night', '*') as "A Classic";
What is returned? (assume the database has an appropriate collation) A: B: C:

See possible answers