PROBLEM

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

Last Published: April 25, 2020

Description

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.

Cause

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

Software:
  • ArcMap 8 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic