Search
 
SCRIPT & CODE EXAMPLE
 

SQL

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
Comment

PREVIOUS NEXT
Code Example
Sql :: sql select without column name 
Sql :: sql ssrs 
Sql :: oracle select 
Sql :: install sql server in ubuntu 20.04 
Sql :: postgres enumerated type 
Sql :: Join multiple table by MySQL 
Sql :: sql and operator 
Sql :: xampp reset mysql 
Sql :: mysql ddl 
Sql :: Should I use the datetime or timestamp data type in MySQL? 
Sql :: ruby sqlite 
Sql :: postgres where 
Sql :: insert sql 
Sql :: primary key 
Sql :: how do you insert boolean to postgresql 
Sql :: join multiple tables in sql same table 
Sql :: sql limit 
Sql :: query params sql insert python f string 
Sql :: use table postgres 
Sql :: knex last insert id mysql 
Sql :: how to set up an anonymous function to variable in swift 
Sql :: sql tablo hangi sp de 
Sql :: formatting code with SQL Developer 
Sql :: TSQL Find csv file in folder 
Sql :: prepared statement mysql java delete selected rows 
Sql :: One table with another 
Sql :: how to find shortest and longest name in sql 
Sql :: postgresql grant alter table to user 
Sql :: insert new department and employee record 
Sql :: get who is hired in month in sql 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =