A simple UDF, ExtractInteger, to extract only numbers from string input. I test it with a phone number that also has letters in it.
STUFF Boundaries: Insert Text and Handle NULL Results
STUFF boundaries govern insertion and deletion. See valid positions, zero length, NULL replacement and out-of-range starts.
TRANSLATE: Map Characters Simultaneously Instead of Cascading Replacements
TRANSLATE maps each input character once, which matters when replacement characters also appear in the search list. Nested REPLACE calls can process earlier replacements again. I compare both results before choosing a cleanup expression.
Splitting Text on Several Delimiters With REGEXP_SPLIT_TO_TABLE
REGEXP_SPLIT_TO_TABLE handles several separators in SQL Server 2025. These examples keep source keys and ordinals while separating trimming from empty-token handling. A small edge-case set also shows where a regular expression is not a CSV parser.
SQL SERVER – UDF – Function to Convert Text String to Title Case – Proper Case
My UDF udf_TitleCase converts any string to Title Case, also called Proper Case. The post has a sample call, its output and the full T-SQL code of the function.





