PROBLEM

Problems with querying boolean fields created in Access

Last Published: April 25, 2020

Description

If a Boolean field has been added to a dataset using an application such as Microsoft Access, ArcGIS converts this field to a short integer and sets all values that are True equal to 1 (True = 1) and False equal to 0 (False = 0).

Cause

A Boolean field contains values of True and False only. Some applications, such as Microsoft Access, use the Boolean field type. Geodatabases and shapefiles do not have a Boolean field.

Solution or Workaround



The selection will not return any records if the statement is written as:

Code:
[boolean field] = 1

Use the following statement, as a workaround, to return all records that are equal to a value of 1:

Code:
[boolean field] <> 0


Note:
The function <> can be interpreted as any value not equal to 0. Since a boolean field only has two values, 0 or 1, the result will yield the selection of values equal to 1.

Article ID:000004783

Software:
  • ArcMap 8 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic