A change in date format shows up when you apply LEFT to GETDATE: the date goes from year first to month name first. This puzzle explains the implicit conversion behind it, how language settings change the text, and how to get the date you want on purpose.
SQL SERVER – Puzzle – Playing with Datetime with Customer Data
Playing with Datetime became a puzzle when one conversion worked for a customer but failed for me. The input was unchanged.
SQL SERVER – Puzzle – Solve Splitting Strings Puzzle
A Splitting Strings puzzle: take a column holding delimited values, split them and return how many values each row has. How would you solve it?
SQL SERVER – Puzzle – Inside Working of Datatype smalldatetime
A developer got odd results when casting strings sent from an app. This puzzle looks at how the smalldatetime datatype works inside SQL Server.
SQL SERVER – Puzzle – DISTINCT Values in NVARCHAR
Why does SELECT DISTINCT treat ‘ß’ and ‘SS’ differently under each collation? A short puzzle on DISTINCT values in NVARCHAR, born from an SSIS unique key error.
SQL SERVER – Process ID X was killed by hostname ABC, host process ID Y
Seen the ERRORLOG message that a process ID was killed by hostname, with a host process ID? I explain each placeholder in error 18100 and what it tells you.
SQL SERVER – Puzzle – Working with functions to Concatenate columns
A code review puzzle: 15 fields joined with ISNULL on every column. Can you concatenate columns with NULL values in a simpler way using SQL Server functions?







