How to strip all non-alphabetic characters from string in SQL Server?

Try this function: Create Function [dbo].[RemoveNonAlphaCharacters](@Temp VarChar(1000)) Returns VarChar(1000) AS Begin Declare @KeepValues as varchar(50) Set @KeepValues=”%[^a-z]%” While PatIndex(@KeepValues, @Temp) > 0 Set @Temp = Stuff(@Temp, PatIndex(@KeepValues, @Temp), 1, ”) Return @Temp End Call it like this: Select dbo.RemoveNonAlphaCharacters(‘abc1234def5678ghi90jkl’) Once you understand the code, you should see that it is relatively simple to change it … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)