sql - Find all but allowed characters in column -
i have query i've been trying make, it's supposed pull rows not contain characters not want.
select nid notes note '%[^0-9a-za-z#.;:/^\(\)\@\ \ \\\-]%' that should return rows not contain
0-9 a-z a-z . : ; ^ & @ \ / ( ) # but time add 1 of these below fails
$ [ ] ? even trying escape them either \ or [[ doesn't seem work properly. have access stock sql install.
it's supposed pull rows do not contain characters not want.
to find rows contain x can use like:
select * yourtable col '%x%' to find rows do not contain x can use not like:
select * yourtable col not '%x%' so query should use not like because want rows don't contain something:
select nid notes note not '%[0-9a-za-z#.;:/^\(\)\@\ \ \\\-]%' that should return rows not contain
0-9 a-z a-z . : ; ^ & @ \ / ( ) #
no. because of ^ @ start, returns rows don't contain characters except those. characters listed characters are allowed.
Comments
Post a Comment