Queries involving fields from several tables in a join select all rows

Last Published: April 25, 2020


This problem is addressed in ArcGIS 8.1 Service Pack 1. See the Related Information section to download this pack.

When executing a query using the Select by Attributes dialog box on a joined layer, all rows are selected when only a subset of rows should be selected.

This seems to happen only for certain queries that involve fields from more than one table in the join.


Before a query is executed, additional expressions are added behind the scenes. In certain very specific cases, these additional expressions alter the results of the query. In these cases, true is returned for all rows, resulting in all rows being selected.

Solution or Workaround

Enclosing parentheses around the query ensures a correct result. For example, the following query will return the correct result:

(codemog.STATE_NAME = 'Colorado' or counties.STATE_NAME = 'California')

Article ID:000003966

  • ArcMap 8 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