A quick T-SQL method using LEN and REPLACE to count the occurrence of character or word in a string, written as a hint for TSQL Beginners Challenge 14.
geometry MakeValid: Repair Can Change the Geometry Type
geometry MakeValid returns a valid geometry from an invalid instance, but the result can change type. I keep the original beside the proposed repair. A validity flag alone does not describe everything that changed.
Random Tokens in SQL Server: Generation, Storage and Expiry Checks
Random tokens in SQL Server need more than a generated value. Their stored state must define expiry, revocation and whether consumption already occurred. A guarded disposable fixture makes the boundary conditions explicit.
GENERATE_SERIES: Make the Step Explicit
GENERATE_SERIES returns numbers within a declared range. These read-only examples specify the step, preserve input types and order every returned series deliberately.
SQL SERVER – Introduction to BINARY_CHECKSUM and Working Example
BINARY_CHECKSUM helps detect changes in a row. My working example shows how it works and why it misses a value changed from A to B and back to A.
geometry STDifference: Keep the Subtraction Direction
geometry STDifference is directional. Two overlapping equal-area rectangles can produce equal remaining areas while retaining entirely different regions.
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.







