Simple CASE and NULL do not match through equality. Use a searched IS NULL branch, preserve empty text, and make the result type explicit.
UNICODE: Supplementary Characters Depend on the Collation
UNICODE returns an integer for the first character, and supplementary-character support affects that integer. I make the collation explicit when interpreting those values. Otherwise the same visible input can produce a misleading comparison.
Matching Two Customer Lists When Names and Emails Are Messy
Clean the text, climb from safe rules to fuzzy ones, and keep one best answer per subscriber. A ladder of joins you can paste into SSMS today.
SQL SERVER – Do Not Store Images in Database – Store Location of Images (URL)
Should you store images in database tables? My advice: keep the image location (URL) in a VARCHAR column instead, so the database stays small and updates stay simple.
SQL SERVER – UDF – Remove Duplicate Chars From String
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.







