SQLTeam.com | Weblogs | Forums

Query to find Special character & numeric in Name field


#1

Help me to find the special character & numeric in Name field except Space( ) and dot(.)


#2

It will be a little difficult to know if this is correct since you've given so very little to go on but...select Name from MyTable where Name like '%[`~!@#$%^&*()--=+{}|\;:''"<,>.?/[[]]%[0-9]%'This is looking for anything followed by a special character followed by anything followed by a digit followed by anything. If you also need to find number before special character, add an OR operator and flip the two substrings in brackets.


#3

Thanks for your Reply Stephen !!

But for doing this it is better to use only like '%[^A-Z]%'

it gives all records which included special characters but also include Space( ) & dot(.) which I want in the clean result


#4

So add the space and dot to the pattern.