HOW TO
Note: The content in this article pertains to ArcGIS versions 9.x. Later versions of ArcGIS may contain different functionality, as well as different names and locations for menus, commands and geoprocessing tools. See the Related Information section for more current content..
The instructions provided describe how to select records that contain odd or even values in a numeric field for use in Select By Attributes, SQL Query, and/or Label Expression dialog boxes.
Use the following expression to select records with even values in a numeric field.
For personal geodatabases:
[FIELD NAME]/2 MOD 2
For shapefiles and file geodatabases:
MOD ("FIELD NAME", 2) = 0
Use the following expression to select records with odd values in a numeric field.
For personal geodatabases:
[FIELD NAME] MOD 2
For shapefiles and file geodatabases:
MOD ("FIELD NAME", 2) = 1
Note: The MOD(integer_exp1, integer_exp2) function returns the remainder of integer_exp1 divided by integer_exp2. Refer to ArcMap: Functions for more information.
Get help from ArcGIS experts
Download the Esri Support App