I am using ArcMap 10.8.1.

I am trying to create a map of a county which does not need to be labeled since it is for a report concerning that county, but every surrounding county does need a label for reference. I originally approached this in a very convoluted way and just made a different shapefile for each county excluding the county I was working within.

This time I'm trying to put more effort into cleaning the process up a bit. I am trying to use SQL in Labeling to define different classes of features. My initial thought was to just use a simple SQL query to label every polygon that is NOT the one I am currently working in (in this case Ashland).

Is there something wrong with the SQL here or am I missing something else?

I get an error saying an invalid SQL statement was used.

enter image description here

  • Data driven maps can do this automatically using a "does not match" page definition query. I cannot tell if you are using DD maps. Also, "IS" is mostly used with special selects such as IS NOT NULL.
    – danak
    Commented Dec 14, 2020 at 16:20

2 Answers 2


You almost got it correct, but IS NOT will not work in this case.

Use the below:-

COUNTY_NAM <> 'Ashland'
  • Great, thank you! I always get confused by these.
    – sploog
    Commented Dec 14, 2020 at 15:52

use this: COUNTY_NAM > 'Ashland' OR COUNTY_NAM < 'Ashland'

Weird but works

  • Pretty much the same as COUNTY_NAM <> 'Ashland' in the other answer
    – Midavalo
    Commented Nov 10, 2023 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.