I am trying to extract all rows which contain a non alpha numeric character at it's most literal except allowing space. Any punctuation, brackets - square and round, currency symbols etc.
I have tried to adapt the advice as given here Return sql rows where field contains ONLY non-alphanumeric characters however using not LIKE '%[a-z0-9]%'
returns rows with a space. Fine. I amend the regex to be not LIKE '%[a-z0-9 ]%'
and I now have zero rows returned. What am I doing wrong?
The question you are referring to is for SQL Server. To do what you want in SQL Server, you would do:
where col like '%[^a-zA-Z0-9]%'
The ^
in the like pattern matches any characters not in the list.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With