papacico papacico - 1 year ago 92
MySQL Question

How to detect addresses with no number

I have a column

with thousands of addresses, most of them have a number but lot of addresses have no number, the addresses are like this:

- streetname 4
- streetname 8
- streetname 4/5
- streetname

how do i detect the fiels like 'streetname' having no number.
I have tryed with:

REGEXP '^-?[0-9]+$';

or isANumber() but none gives the right result

Answer Source

You could use:

address rlike '^[^0-9]*$'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download