laptop and a wrench

Bug

The error message, "Invalid Expression" is returned when using Select Layer by Attribute with large query expressions.

Last Published: September 22, 2021 ArcGIS Pro
Bug ID Number BUG-000141724
SubmittedJuly 27, 2021
Last ModifiedApril 11, 2025
Applies toArcGIS Pro
Version found2.8
Operating SystemWindows OS
Operating System Version10.0
StatusKnown Limit

Additional Information

Use the IN clause to shorten the length of the WHERE clause.

Workaround

  1. Open the project in ArcGIS Pro.
  2. Open the Select By Attributes tool.
  3. Under Expression, click the Edit SQL mode button to switch to the SQL mode.
  4. In Expression, in the first line, type the following formula: GLOBALID IN (.
    1. Press Enter twice. 
    2. Copy all the Global IDs and paste them into the Expression box. 
    3. Press Enter twice.
    4. Type ).
  5. The Select By Attributes tool works successfully for all 5000 records and generates complete results.

Steps to Reproduce

Bug ID: BUG-000141724

Software:

  • ArcGIS Pro

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options