This Julian date example uses an ordinal YYYYDDD code. I distinguish that business encoding from an astronomical Julian day number.
SQL SERVER – Quiz with DATEADD Function – SQL Puzzle
The DATEADD function returns the last day of the month when the day does not exist, so one month after January 31 is February 28. This post keeps the quiz, runs every query on SQL Server 2025 and explains the month rule and the Msg 517 overflow with the real results.
Gaps and Islands: Finding Missing Ranges in a Sequence
Solve gaps and islands with LEAD, ROW_NUMBER, and GENERATE_SERIES, then apply the same date patterns to missing days and login streaks.
SQL SERVER – The Easy Functions of SQL Server – Notes from the Field #062
Kathi Kellenberger, the SQL author who got me hooked early in my career, explains some easy functions of SQL Server that many experts still do not know.
The Last Entered Row: Why a Table Needs an Ordering Column
A table has no last row until you define one. Here is how identity, event time and ties give different answers.
SQL SERVER – List the Name of the Months Between Date Ranges – Part 2
Part 2 on listing the names of the months between date ranges, with an improved script from readers Miladin Joksic and Peter Lalovsky that adds more details.
SQL SERVER – List the Name of the Months Between Date Ranges – Correction
Sanjay Monpara caught a small error in my script to list the name of the months between two dates: it skipped the first month. Here is his corrected script.






