Quick search for a certain character within an field.

05-19-2016 11:40 AM
Occasional Contributor

I have done this before, but it has been a while. I have a point shape file. I want to search for the "feature code" field that has the letter "A" in it.  Can someone remind me how to do that?

0 Kudos
2 Replies
MVP Legendary Contributor

select by attributes Using Select By Attributes—Help | ArcGIS for Desktop

with the wildcard thing Building a query expression—Help | ArcGIS for Desktop

YourField like 'A%'

but type as little as possible, select the fields, the operands, where possible and ensure there are spaces as shown

0 Kudos
MVP Esteemed Contributor
YourField LIKE 'A%'
SUBSTRING(YourField FROM 1 FOR 1) = 'A'

YourField starts with (capital) A

YourField LIKE '%A%'

YourField contains (capital) A

UPPER(YourField) LIKE '%A%'

YourField contains 'A' or 'a'

0 Kudos