How to extract alphanumeric characters from a string?

This is possible by using the combination of PATINDEX() and STUFF() functions. Step 1: Declare a Parameter and Store the string in it. Step 2: Search for Alphanumeric characters from the string by using PATINDEX. If exists, just loop the following statements.

Read More

What is the difference between REPLACE() and STUFF() functions?

REPLACE() It is used to replace all the occurrences of the second argument in the first argument with the third argument. Syntax: REPLACE (String, StringPattern, StringTobeReplaced) Ex: SELECT REPLACE (‘SQLVERSITY is a good website’, ‘good’, ‘great’) Output: SQLVERSITY is a great website STUFF()

Read More