DATEDIFF_BIG returns bigint boundary counts. Compare a long seconds interval, reversed dates and a tiny boundary crossing without overflowing int.
smallmoney: Four Fractional Digits Need a Contract
smallmoney stores a bounded numeric amount with four fractional digits. These explicit conversions show retained and changed digits without making a financial storage recommendation.
geometry STSymDifference: Keep the Parts Outside the Overlap
geometry STSymDifference keeps points belonging to either input while excluding their shared portion. I use it when both sides’ exclusive regions matter. Directed subtraction would answer a different question about only one side.
FIRST_VALUE IGNORE NULLS: Find the First Available Value
FIRST_VALUE IGNORE NULLS selects the first present value through the current row. Preserve source rows and distinguish first from latest.
geometry STCentroid: The Geometric Center Is Not an Interior Promise
geometry STCentroid returns a polygon’s geometric center, but that point is not a promise of interior placement. I keep the center calculation separate from an interior test. A holed region makes that distinction visible.
AsGml: Export a Shape as Namespaced XML
AsGml exports geometry as XML in the GML namespace. Read a line’s coordinates with a qualified path and compare an unqualified path.
Adding Business Hours to a Timestamp in T-SQL
Add business hours through a stored work calendar, skip closed dates and nights, and calculate ticket deadlines without a minute loop.







