I have a query I’ve been trying to make, it’s supposed to pull all rows that do not contain characters we do not want.
SELECT NID FROM NOTES WHERE NOTE LIKE '%[^0-9a-zA-Z#.;:/^\(\)\@\ \ \\\-]%'
That should return any rows that do not contain
0-9 a-z A-z . : ; ^ & @ \ / ( ) #
But any time i add one of these below it fails
$ [ ] ?
Even trying to escape them either by \ or [[ doesn’t seem to work properly. I only have access to stock SQL install.
To find rows that contain
xyou can useLIKE:To find rows that do not contain
xyou can useNOT LIKE:So your query should use
NOT LIKEbecause you want rows that don’t contain something:No. Because of the
^at the start, it returns the rows that don’t contain characters except those. Those characters you listed are the characters that are allowed.