Reader Dan Golden built on my weekly calendar function to create a UDF to return a calendar for any date for any year. I fixed a small first and last week bug.
LOG With a Base: Make the Calculation Explicit
LOG with a base makes logarithm meaning explicit. Compare base two, base ten and the natural default using typed, positive inputs.
SQL SERVER – Get Current Database Name
Need the current database name in a script? SELECT DB_NAME() returns the name of the database you are running the query in. It is a one line answer.
SQL SERVER – 2005 – Find Unused Indexes of Current Database
A simple but accurate SQL Server 2005 script to find unused indexes in the current database, since unused indexes slow down INSERT and UPDATE statements.
NULL Sort Order: Put Missing Values Where Readers Expect
NULL sort order uses a CASE bucket to put missing values last. Keep a stable tie breaker and preserve the original score.
SQL SERVER – Import CSV File Into SQL Server Using Bulk Insert – Load Comma Delimited File Into SQL Server
How to import CSV file data into SQL Server with BULK INSERT: create a table, point to the comma delimited file and load every row in a few quick steps.







