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 :: oracle last character of string 
Sql :: sql last 7 days 
Sql :: sql between date range 
Sql :: create schema sql server 
Sql :: restart mysql server ubuntu 
Sql :: find a column in all tables postgres 
Sql :: rror: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client 
Sql :: mysql server start 
Sql :: postgresql datetrunc too slow 
Sql :: search for tables with name postgresql 
Sql :: mysql count words 
Sql :: psql list rules 
Sql :: import sql file laravel cmd 
Sql :: python mysql select 
Sql :: pyodbc connect to sql server 
Sql :: How to fetch data in between startfromdate to starenddate in sql 
Sql :: reset auto increment in sql 
Sql :: oracle list tables 
Sql :: restart identity cascade 
Sql :: dao function to check if database contains value 
Sql :: sql remanecolumn 
Sql :: oracle show trigger code 
Sql :: set boolean flasksql 
Sql :: sql delete stored procedure 
Sql :: import sql file in mysql 
Sql :: set all the vluses in calumn in sql to false 
Sql :: mysql copy table1 to table2 
Sql :: mysql error codeigniter 
Sql :: sql drop table statement 
Sql :: How to View column names of a table in SQL 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =