Hello I'm using the following function and call to remove non alphanumeric characters from a string.
It does do this but also removes white space.
I need to remove all non alphanumeric characters while leaving white space for our product title field of our products table.
How can I adjust my function to leave the white space?
Create Function [dbo].[RemoveNonAlphaCharacters](@Temp VarChar(1000))
Declare @KeepValues as varchar(50) = '%[^a-z0-9]%'
While PatIndex(@KeepValues, @Temp) > 0
Set @Temp = Stuff(@Temp, PatIndex(@KeepValues, @Temp), 1, '')
rs('This and that-:(_)')