A reader asked how to relate two unrelated tables, Table_A and Table_B, and show them in one output. Here is my answer to this unusual question.
Puzzle – Datatime to DateTime2 Conversation in SQL Server 2017
At PASS, SQL Server expert Christopher Savage showed me a puzzle on DateTime to DateTime2 conversion in SQL Server 2017. I still have no answer, so can you solve it?
SQL SERVER – Puzzle – Why Such a Complicated Execution Plan for a Single Row, Single Table Query?
A simple puzzle: why does SQL Server show such a complicated execution plan for a single row, single table query on WideWorldImporters? Try to solve it.
SQL SERVER – Puzzle – How Does YEAR Function Work?
SELECT YEAR(35000/20) returns 1904, which looks strange. This puzzle shows how the YEAR function treats a plain integer. Can you explain the result?
SQL SERVER – Puzzle – SQL Server Stored Procedure and Unexpected Results
The matter of the fact when I discovered this puzzle related to the stored procedure and unexpected results, I was very much surprised as well.
SQL SERVER – Puzzle – How Does Table Qualifier Work in INSERT Statement?
You can use a table alias in SELECT just fine, but how does a Table Qualifier work in the column list of an INSERT statement? Try this short puzzle.
SQL SERVER – Puzzle – Get the First Name From Full Name Without CHARINDEX
This First Name From Full Name puzzle excludes CHARINDEX and SUBSTRING. It came from a customer query during a performance health check.




