PROBLEM

The Select Layer By Attribute tool returns the opposite records of the query in ArcGIS Pro

Last Published: October 26, 2022

Description

In ArcGIS Pro, attempting to select features in a map using the Select Layer By Attribute tool returns the opposite records of the query.

In this example, the query in the Select Layer By Attribute tool is to select the layer with the OBJECTID that equals to 12. However, the selected layers are those with the OBJECTID that do not equal to 12, as shown in the image below.

The layer with the OBJECTID that equals to 12 is not selected using the query in ArcGIS Pro.

Cause

The Invert Where Clause option is enabled in the Select Layer By Attribute tool. Thus, running the tool returns the inverse results of the query.

Solution or Workaround

To solve the issue, ensure the Invert Where Clause option is disabled before running the Select Layer By Attribute tool. Refer to ArcGIS Pro: Parameters for more information on the Select Layer By Attribute tool.

The Select Layer By Attribute tool window to be configured.

Alternatively, once the opposite record of the query is selected, use Switch Selection in the attribute table to deselect all the selected features and select all the deselected ones. In the Contents pane, right-click the feature layer, navigate to Selection, and click Switch Selection.

Selecting Switch Selection in the Contents pane.

Article ID: 000028570

Software:
  • ArcGIS Pro 3 0
  • ArcGIS Pro 2 8 x
  • ArcGIS Pro 2 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options