sql server - Removing special characters and numbers in sql table field -


i have table in sql server 2008 column contains field string , special characters abc;#34;pqr. want function remove special characters , numbers field ;so output abcpqr.

try

declare @str varchar(400)     declare @expres  varchar(50) = '%[~,@,#,$,%,&,*,(,),.,!,0-9]%'       set @str = '(remove) ~special~ 10 *characters. 3 5 string 1 in sql!'       while patindex( @expres, @str ) > 0           set @str = replace(replace( @str, substring( @str, patindex( @expres, @str ), 1 ),''),'-',' ')        select @str 

reference


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -