An int column turns 01234 into 1234 and never gives the zero back. Here is how to fix the column, and how to repair old rows without guessing.
Scalar Subqueries: An Empty Input Produces NULL
Scalar subqueries contribute one value to an outer row. Keep row absence separate from a present NULL and enforce the at-most-one-row contract.
sp_execute_external_script: Run Python Inside SQL Server
Before you write any Python, check four switches. Here is how to read them, what error 39023 means, and what to test on your own server.
Reading the Connectivity Ring Buffer for Dropped Connections
The error log says nothing, but the connectivity ring buffer may remember. Here is how to read it and what it cannot tell you.
Status Changes Only: Collapsing Repeated Rows With LAG
Hundreds of repeated readings, three real changes. Here is how LAG finds them, and why a plain not-equal test quietly drops rows.
Self-Referencing Foreign Keys: Managers, Employees and Deletes
Delete a manager and SQL Server says no, which is good. See how to reassign reports safely and how to catch loops the foreign key allows.
Line Endings: CHAR(13), CHAR(10) and Files From Other Systems
Why does a value that looks perfect fail a compare? Because of a line ending you cannot see. Five small demos make it visible.







