A reader, Virendra Chauhan, shared a UDF that removes duplicate chars from one large string. Here is his REMOVE_DUPLICATE_INSTR function and how to call it.
RIGHT: Zero Padding Can Remove Significant Digits
RIGHT can make zero padding look correct while quietly removing significant digits. I validate the allowed numeric range before creating a fixed-width label. The suffix expression alone cannot tell whether the input fits.
New Line in SQL Server Strings: CHAR(13) and CHAR(10)
A new line in SQL Server is a character in the string, not formatting. This post tests CHAR(13) and CHAR(10) on SQL Server 2025, shows how to find and remove line breaks in stored data, and shows why RTRIM leaves a trailing break and how a line break ends a single-line comment in dynamic SQL.
SQL SERVER – 2005 Collation Explanation and Translation – Part 2
Collation Explanation and Translation, part 2: one query on sys.fn_helpcollations() lists all 1011 collations in SQL Server 2005 with a description of each.
CONCAT_WS: Keep NULL and Empty Strings Separate
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.
REPLACE Return Limits: Cast the Input to max
REPLACE return limits can truncate text at 8,000 bytes. Cast the searched input to max first, then compare Unicode and non-Unicode byte lengths.







