You can use cast and like: CAST("Somefield" AS CHARACTER(3)) NOT LIKE '18%' See [Using SQL CAST functionality in against a File Geodatabase][1] You might need to change the double quotation marks to single or remove them completely around your fieldname depending on your input (shapefile, feature class in fgdb, etc). [1]: https://community.esri.com/thread/49756