CONCAT_WS joins values with a separator, but NULL and empty strings have different effects. These examples keep the original fields beside the combined text and byte length.
LAST_VALUE: Set the Window Frame for the Final Row
LAST_VALUE changes with its window frame. Compare implicit and whole-partition frames, order tied rows and preserve a final NULL.
BIT_COUNT: Count Set Bits Without Changing Integer Width
BIT_COUNT counts active positions in a typed value. Keep integer width visible and distinguish a missing mask from a zero count.
SQL SERVER – Explanation and Comparison of NULLIF and ISNULL
NULLIF returns NULL when two expressions are equal and the first one when they are not. Here is how it compares with ISNULL and the matching CASE expression.
SQL SERVER – 2005 – UDF – User Defined Function to Strip HTML – Parse HTML – No Regular Expression
A simple SQL Server function to parse HTML and keep only the text, with no regular expressions needed. Copy the UDF and try it on your own data.
How to Read a SQL Server Error Message
Read a SQL Server error message by separating its number, severity, state, procedure, and line, then preserve the context needed to investigate.







