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.
SQL SERVER – 2005 Constraint on VARCHAR(MAX) Field To Limit It Certain Length
SQL Server 2005 has no VARCHAR(12500), so how do you cap a VARCHAR(MAX) field at 12500 characters? A constraint on the column does the job.
SQL SERVER – 2005 Replace TEXT with VARCHAR(MAX) – Stop using TEXT, NTEXT, IMAGE Data Types
Is VARCHAR(MAX) big enough to hold TEXT? Yes. TEXT, NTEXT and IMAGE will be deprecated, so replace TEXT with VARCHAR(MAX) and use the new MAX data types.
SQL SERVER – UDF – Function to Parse AlphaNumeric Characters from String
UDF_ParseAlphaChars keeps only the alphanumeric characters in a string and strips everything else using PATINDEX and STUFF. A handy function, with a test.
REGEXP_LIKE in SQL Server 2025: Validating Codes, Emails and Phone Numbers
Validate codes, email shapes and phone numbers with REGEXP_LIKE in SQL Server 2025, using clear patterns and CHECK constraints.
SQL SERVER – User Defined Functions (UDF) to Reverse String – UDF_ReverseString
UDF_ReverseString returns a reversed string starting from any position you pass. The script of the function plus usage examples, like reversing from the third character.
STRING_SPLIT Ordinals: Order the Rows You Read
STRING_SPLIT ordinals preserve a token position for SQL Server 2022 and later. This example keeps duplicate tokens, exposes an empty token and orders the returned rows explicitly.







