liv a liv a - 1 year ago 123
SQL Question

SQL Query Where Field DOES NOT Contain numeric value

I have a table with an address street, I want to make sure the address contains the street as well as house/building number (saxon 17)
I want to write an SQL query to find rows where field address does not contain a numeric value. How can I do this?

Answer Source

This can be done using a regular expression:

select *
from the_table
where address_column !~ '[0-9]'

More details about regular expressions and pattern matching can be found in the manual:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download