Answers for "how to remove all none alpha numeric characters from a string using sql"

SQL
2

t-sql remove all non-alphanumeric characters from a string

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
Posted by: Guest on March-16-2020
0

sql remove non numeric characters

SELECT REGEXP_REPLACE( fieldname, '[^[:digit:]]', '' ) AS newfieldname FROM tablename
Posted by: Guest on November-06-2020

Code answers related to "how to remove all none alpha numeric characters from a string using sql"

Code answers related to "SQL"

Browse Popular Code Answers by Language