COALESCE fallbacks keep empty text and spaces as supplied values. Apply an empty-value policy before choosing a display name.
Conditional COUNT: ELSE 0 Counts Nonmatching Rows
Conditional COUNT includes zero when CASE returns it. I compare an omitted ELSE with a zero branch before aggregating. A no-match group and an empty input expose the difference from SUM.
SQL SERVER – Reclaim Space After Dropping Variable – Length Columns Using DBCC CLEANTABLE
DBCC CLEANTABLE can reclaim selected space left after dropping variable-length columns. I distinguish that table operation from shrinking a database file.
geometry STIsClosed and STIsSimple: Ask Both Questions
geometry STIsClosed does not establish simplicity. These three complete line descriptions compare endpoint closure with self-intersection.
SQL SERVER – Quick Note on CROSS APPLY
A quick note on CROSS APPLY: think of it as an inner join to a table valued function that takes parameters, something a regular JOIN cannot do.
geometry STEnvelope: A Bounding Box Includes Extra Space
geometry STEnvelope can include points outside the original shape. These two triangle tests keep envelope membership beside exact containment.







