The AT TIME ZONE feature arrived in SQL Server 2016. Here is a simple two-step example that converts US East Coast time to West Coast time.
SQL SERVER – Convert Decimal to Time Format in String
A very strange question I received the other day in an email about how to convert decimal to time format string.
SQL SERVER – Remove Duplicate Chars From String – Part 2
My earlier UDF used a WHILE loop to remove duplicate characters. Here is another way to Remove Duplicate chars from a string using a tally number table.
How to Insert Line Break in SQL Server String? – Interview Question of the Week #139
How do you insert a Line Break in a SQL Server string? Just press Enter inside the string, and switch SSMS results to text to see it. Here is how it works.
What is the Biggest Limitation of ISDATE() Function? – Interview Question of the Week #137
Why does ISDATE(‘6666-04-30’) return 1 but ISDATE(‘1111-04-30’) return 0? Here are what I see as the two biggest limitations of the ISDATE() function.
SQL SERVER – Puzzle – Write a Shortest Code to Produce Zero
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 – Learning DATEDIFF_BIG Function in SQL Server 2016
DATEDIFF returns INT and overflows with Msg 535 on large ranges. SQL Server 2016 adds DATEDIFF_BIG, which returns BIGINT. Here is a simple example.


