My Index Optimization checklist for Jr. DBAs: index columns used in WHERE, ORDER BY, GROUP BY and JOINs, drop indexes you do not need and keep keys small.
SQL SERVER – 2005/2000 Examples and Explanation for GOTO
How the GOTO statement jumps to a label in the same T-SQL batch. My explanation for GOTO covers the syntax, the rules and when I still use it.
SQL SERVER – Creating Comma Separate Values List from Table – UDF – SP
Three ways to build a Comma Separate Values List from a table: COALESCE, a smart SELECT, or a cursor. Written for SQL Server 2005 with VARCHAR(MAX).
SQL SERVER – UDF – Function to Convert List to Table
A UDF, udf_List2Table, to convert list to table with any delimiter you choose. Written for SQL Server 2005 with VARCHAR(MAX), and easy to adapt for 2000.
SQL SERVER – 2005 Enable CLR using T-SQL script
In SQL Server 2005 the CLR is off by default. Here is the sp_configure script to enable CLR, turning on show advanced options and then clr enabled.
SQL SERVER – UDF – User Defined Function to Find Weekdays Between Two Dates
A user defined function that returns the number of weekdays between two dates, skipping Saturday and Sunday. It was written by Alexander Chigrik.







