Solved

SQL Select - Finding chars in a column

Posted on 2016-09-22
2
70 Views
Last Modified: 2016-09-27
I need to find column values that contain any letter or special character.  Basically I want to do the same thing as this regular expression - [a-zA-Z-&$!@#$%^&*()_+=]* .  So is there an easy to do this  with a SQL Select.  I do not want to have to specify a like for every value.
0
Comment
Question by:tmajor99
2 Comments
 
LVL 69

Accepted Solution

by:
Scott Pletcher earned 500 total points
ID: 41811342
Maybe?:

name LIKE '%[^0-9]%'
0
 
LVL 12

Expert Comment

by:Arifhusen Ansari
ID: 41812192
There is noway you can have the search by regular expression in sql server.

You have to use custom assembly for the same.  It's like using CLR Code for the same.

Refer the below link you will get the clear idea.

http://www.codeproject.com/Articles/85954/Use-RegEx-in-SQL-with-CLR-Procs
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question