Query to remove the matching expression SQLServer
A simple query to remove the particular patreen from the entire string, its just like reggular expression in the ASP.Net
Query to strip the matching expression charectors from string ,
Declare @myExpression varchar(50)
Declare @queryString varchar(max)
SET @myExpression = '%['+@myExpression +']%'
WHILE PatIndex(@myExpression, @queryString ) > 0
SET @queryString = Stuff(@queryString , PatIndex(@myExpression, @queryString ), 1, '')
Select @queryString
Ex :
set @queryString = '2fsfse54646vdf00_*gf,,dg45$'
set @myExpression = 'a-z*$,'