STCurveToLine approximates circular curves with linear geometry. Compare curve, polygon, point, empty and NULL results by their type and state.
SQL SERVER – Log File Growing for Model Database – model Database Log File Grew Too Big
Why did the model database log file grow every day with no activity? The reader was backing up the model database every night. Here is the proof.
SQL SERVER 2008 – 2012 – Declare and Assign Variable in Single Statement
Since SQL Server 2008 you can declare and assign variable values in one statement. This inline assignment saves lines of code, yet I rarely see it used.
IS DISTINCT FROM: Compare Nullable Values Without Sentinel Values
IS DISTINCT FROM compares nullable values without inventing a sentinel. Test two NULLs, one NULL and changed values, then use the predicate to find transitions that ordinary equality can miss.
GTIN-13 Check Digits: Validate the Final Digit in a CHECK Constraint
A GTIN-13 check digit validates a weighted checksum, not product identity. Test complete ASCII input, leading zeros and the final digit in a CHECK constraint, then see why some digit swaps still pass.
geometry STNumPoints: Closing Coordinates Count Again
geometry STNumPoints counts coordinates in the spatial description. A square ring contains its closing coordinate as well as its four distinct corners.
SQL SERVER – Difference between COUNT(DISTINCT) vs COUNT(ALL)
What is the difference between COUNT(DISTINCT) and COUNT(ALL)? A student asked me at a college session, and one quick script made the answer clear.






