Link to home
Start Free TrialLog in
Avatar of Rubicon2009
Rubicon2009

asked on

TSQL : Find non a-z, A-Z, "-" caracters in a column

Hi !

I need to find a way to query my SQL 2008 database to find all caracters that are not a-z, A-Z and "-" in the column named "address".

The database collation is : Latin1_General_CI_AS

I've try to do "SELECT address FROM users where address LIKE '%é%' but this was not effective.

-M
ASKER CERTIFIED SOLUTION
Avatar of sshah254
sshah254

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Is this what you are looking for?

SELECT address FROM users where address LIKE '%[^A-Za-z]%'

The ^ is like Not

This might work;
SELECT address FROM users where address NOT LIKE '%[A-Za-z]%'
SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial