I have an attribute field in my file geodatabase (GDB) where I'm trying to select all records that contain an underbar in the string field. The issue is that the underbar is considered a SQL wildcard on its own.
To illustrate: I need all data similar to "ID" = '42W_42_42E' or "ID" = '31A_31'
Using "ID" LIKE '%_%' returns all records, which isn't helpful. The perfect solution would simply return a count on the number of records with the underbar in their ID attribute.
Best Answer
From the page on SQL reference for query expressions used in ArcGIS
For your case, try the following: