Keyset paging continues after a saved ordering key instead of counting past an offset. A date and unique ID together keep equal-date rows in the sequence. A guarded disposable fixture makes the boundary conditions explicit.
SQL SERVER – SELECT * FROM dual – Dual Equivalent
Oracle developers often miss the DUAL table in SQL Server. I explain what DUAL is, why SELECT * FROM dual fails with Msg 208, and the dual equivalent to use.
SQL SERVER – Identifying Statistics Used by Query
Can you find the statistics used by query? There is no direct tool or DMV for it, but I explain an indirect way through the indexes a query uses.
Fast Exports With bcp
Fast exports with bcp compares native and character files, shows a format file, and explains where batch size helps and how to check a large export.
Fixing Invalid Geography Polygons and Ring Orientation
Diagnose invalid geography polygons with STIsValid and IsValidDetailed, repair with MakeValid, and check ring orientation and EnvelopeAngle.
SQL SERVER – Datetime Function TODATETIMEOFFSET Example
A quick example of the datetime function TODATETIMEOFFSET in SQL Server, and how it differs from SWITCHOFFSET when offsets change.
SQL SERVER – Datetime Function SWITCHOFFSET Example
SWITCHOFFSET changes a datetimeoffset value from its stored time zone offset to a new one. Here is a quick example of how it works in SQL Server 2008.







