SQL only return values where first letter is between A-Z

I am trying to return only values from a field that have the first letter between A-Z,

I have tried using the below but this only does one letter at a time.

UPPER(LEFT(AD_ADDR,1)) like 'A%'

The other characters will be 0-10, which I want to exclude but are formatted as strings, so using IS_INTEGER doesn’t work.

>Solution :

Using RLIKE:

SELECT *
FROM tab
WHERE AD_ADDR RLIKE '[a-zA-Z].*';

Leave a Reply