A puzzle: write the shortest code that produces zero without numbers, arithmetic, the digit 0 or LEN(). I show one valid answer; can you find another?
SQL SERVER – Puzzle – Incorrect Results with Decimal
A new puzzle: a simple table with price and discount returns Incorrect Results with DECIMAL. Can you work out why without running the code in SSMS?
SQL SERVER – Why We have Audit Trace in DATA Folder? What are These Files?
The DATA drive filled up with thousands of audittrace .trc files. Here is why SQL Server writes audit trace files there and how to stop them.
SQL SERVER – Puzzle – Why does sp_spaceused Show No Values?
Why does sp_spaceused show no values for a table that clearly has rows? It stumped me for 10 minutes. Here is the puzzle, try it before reading on.
SQL SERVER Puzzle – Conversion with Date Data Types
Converting values with CAST can round in ways you don’t expect. A puzzle on Date Data Types: guess the output of each query before you run it.
SQL SERVER – Puzzle – Change in Date Format with Function
SELECT GETDATE() shows both date and time. A simple Date Format puzzle: show only the date part using a function. How many ways can you find?
SQL SERVER – Puzzle – Playing with Datetime with Customer Data
A customer sent me code that converts datetime values stored in his data. This puzzle is about playing with datetime conversions. Guess the output first.





