XML query retains selected markup and attributes. Distinguish an empty fragment from a missing document, and review the display type.
SUBSTRING Binary: Count Bytes Rather Than Characters
SUBSTRING binary offsets use byte units. Keep text slicing separate from encoded payload slicing and retain empty and missing cases.
SIGN: Classify Positive, Negative and Zero Values
SIGN describes which side of zero an amount occupies. Preserve the original quantity and distinguish a zero value from missing input.
geometry STIsValid: Parsed Shapes Still Need a Validity Check
geometry STIsValid checks whether a spatial instance satisfies the validity rules for its geometry type. I use two parsed lines to separate those questions. Successful construction alone does not establish that a shape is valid.
geometry STUnion: Merge the Shared Area Only Once
geometry STUnion merges geometry coverage. These exact-coordinate rectangles distinguish a combined area from the sum of two areas, including duplicate coverage.
REGEXP_INSTR: Locate a Match or a Capture Group
REGEXP_INSTR returns the position of a selected regular-expression match or capture group. I compare its positional arguments using one short string. This example needs SQL Server 2025 and database compatibility level 170.
ISNULL Versus COALESCE: Return Length Can Change
ISNULL versus COALESCE can preserve different string widths. Make the intended replacement type explicit before characters are truncated.







