Why does a stored procedure take longer the first time? Stored procedures are not pre-compiled; each one is compiled on first run and cached after that.
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.
SQL SERVER – How to Enable Index – How to Disable Index – Incorrect syntax near ‘ENABLE’
ALTER INDEX with ENABLE fails with Incorrect syntax near ‘ENABLE’. To enable index after you disable it for a bulk load, you rebuild it instead.
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.
SQL SERVER – Difference Between Candidate Keys and Primary Key In Simple Words
The difference between candidate keys and primary key in simple words: any unique column can be a candidate key, but only one becomes the primary key.
SQL SERVER – Change Collation of Database Column – T-SQL Script – Consolidating Collations – Extention Script
Brian Cidern’s extension script for consolidating collations across a database, a big help when you face the annoying cannot resolve collation error.
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.







