Recently I got a very unique situation where I had to Remove All Query Cached Plans Not Used In Certain Period. Let us learn about that today.
SQL SERVER – PRINT Statement and Format of Date Datatype
we took a 5 minutes coffee break and during that short time, one of the DBA asked me a question about PRINT Statement and DataType.
SQL SERVER – Building Date and Time with DATETIMEFROMPARTS()
Today we will have very simple learning about Building Date and Time with DATETIMEFROMPARTS(). We will build the DateTime using a function.
SQL SERVER – Find Out Current Language of the Session
How do you find the current language setting of your session? A reader asked me, and @@LANGID with sys.syslanguages gives the answer in one short query.
How to Trim TIME Part in DATETIME Values? – Interview Question of the Week #200
How to trim TIME part in DATETIME values? A reader wanted to keep only the date and the hour, so here are ways to cut off the minutes and seconds.
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 – Formatted Date and Alias Name in ORDER BY Clause
Format a date with CONVERT, then use its alias in ORDER BY, and the rows come back in a different order. Here is a simple example of this formatted date surprise.




