A short query to delete duplicate records from a table with an identity column: keep the MAX(ID) in each group of duplicate columns and remove the rest.
SQL SERVER – T-SQL Script to find the CD key from Registry
Need the SQL Server CD key used at install time? The undocumented xp_regread reads it straight from the registry. Log in as SA if you lack permission.
SQL SERVER – Creating Comma Separate List From Table
This post now points to my updated script for creating a Comma Separate Values List from a table, rewritten in May 2007 to support SQL Server 2005.
SQL SERVER – Function to Convert List to Table
This old post now points to my updated UDF, the Function to Convert List to Table, which I rewrote in May 2007 to support SQL Server 2005.
SQL SERVER – UDF – Function to Convert Text String to Title Case – Proper Case
My UDF udf_TitleCase converts any string to Title Case, also called Proper Case. The post has a sample call, its output and the full T-SQL code of the function.







