DATEDIFF_BIG returns bigint boundary counts. Compare a long seconds interval, reversed dates and a tiny boundary crossing without overflowing int.
What Is Installed? Finding Every SQL Server Component
Finding every SQL Server component starts with the Setup discovery report, then checks services, engine versions, and separate client tools.
Following a Blocking Chain to the Head Blocker
Follow SQL Server blocking_session_id through a blocking chain, identify the head blocker, and choose a safe ending for the wait.
Pre-Aggregating Data for Fast Dashboards
Pre-aggregating data can make dashboards fast through summary tables or indexed views when grain, refresh, and reader consistency are clear.
SQL SERVER – Comma Separated Values (CSV) from Table Column
The script I use most often to build Comma Separated Values (CSV) from a table column with FOR XML PATH. I think XML is the best option for code and speed.
SQL SERVER – Interesting Observation – TOP 100 PERCENT and ORDER BY
ORDER BY in a view raises Msg 1033 unless TOP is used, so many developers add TOP 100 PERCENT. An interesting observation on what that really does.
SQL SERVER – A Common Design Problem – Should the Primary Key Always be a Clustered Index
Should the Primary Key always be a clustered index? A design discussion about SSN numbers stored as strings and when a separate clustered index makes sense.







