SQL Server 2008 query to find rows containing non-alphanumeric characters in a column
Won’t this do it? SELECT * FROM TABLE WHERE COLUMN_NAME LIKE ‘%[^a-zA-Z0-9]%’ Setup use tempdb create table mytable ( mycol varchar(40) NULL) insert into mytable VALUES (‘abcd’) insert into mytable VALUES (‘ABCD’) insert into mytable VALUES (‘1234’) insert into mytable VALUES (‘efg%^&hji’) insert into mytable VALUES (NULL) insert into mytable VALUES (”) insert into mytable … Read more