STConvexHull encloses a geometry with its smallest convex hull. Compare a concave polygon, a collinear line and a point using area and membership.
Multiset Difference: Remove Only Matching Duplicate Occurrences
Multiset difference removes matching occurrences while keeping any extra copies from the left input. I assign occurrence numbers before pairing rows. A value’s presence on the right should not automatically remove every left copy.
SQL SERVER – 2005 – Sample Example of RANKING Functions – ROW_NUMBER, RANK, DENSE_RANK, NTILE
SQL Server 2005 has four ranking functions: ROW_NUMBER, RANK, DENSE_RANK and NTILE. I explain what each returns and show a sample example of all four.
LEN Versus DATALENGTH: Trailing Spaces and Unicode Bytes
LEN versus DATALENGTH answers different length questions. Use explicit text types to check trailing spaces, Unicode bytes, empty values and NULL.
SQL SERVER – Two Connections Related Global Variables Explained – @@CONNECTIONS and @@MAX_CONNECTIONS
@@CONNECTIONS and @@MAX_CONNECTIONS explained: login attempts since SQL Server started versus the most simultaneous user connections allowed.
SQL SERVER – UDF – Validate Positive Integer Function – Validate Natural Integer Function
A Jr. DBA at my company changed my integer check so it accepts only a positive integer. I share his udf_IsNatural function with a few test values.
SQL SERVER – Difference Between UPDATE and UPDATE() in Triggers
UPDATE changes rows in a table or view, while UPDATE() in triggers tells you if a column was part of an INSERT or UPDATE. Here is the difference.







