[GIS] Select by Attributes – If string has a letter

arcgis-10.1arcgis-desktopquerysql

I'm running ArcMap 10.1.

I'm using a File Geodatabase.

I have a string coordinate field that I want to clean and some records have letters in it (mostly 'N' or 'E' or 'n' or 'e' e.g. '6213210N' or 'N6584312' but also some refer to map a grid reference e.g 'm29').

I want to select the records that have a letter regardless of it's position or what letter.

Why wouldn't this work?

UPPER("CoordinateField") LIKE '%[A-Z]%'

As far as I can see it works in for similar solutions but not in ArcGIS. As seen here.

Am I using incorrect notation for something stored in a File Geodatabase?

Hoping someone can shed some light on this. Much appreciated.

Best Answer

The syntax of the query is usually dictated by the underlying database, and file geodatabases do not support '%[A-Z]%' style LIKE predicates.

But, if it is just letters that have multiple cases, you should be able to compare the output of UPPER and LOWER functions for changes. If there aren't any, then there aren't any characters that have case. This will not detect special characters like ! @ #. I am sure this will also fail if there are letters from some other non-English alphabets.

UPPER("CoordinateField") <> "CoordinateField" OR LOWER("CoordinateField") <> "CoordinateField"
Related Question