ArcGIS Pro 3.4.0; file geodatabase
I have a SQL expression in Select By Attributes that selects a row.
Now, I remove the SQL expression. I hit Apply, expecting the selection to be cleared (no rows selected). However, the opposite happened; all rows were selected.
That's not expected. Could that behavior be changed so that hitting apply when there are no SQL expressions selects no records?
BUG-000173175 has been changed to Status: As Designed
An empty expression or SQL selecting everything is by design. The same applies to the tool in ArcMap 10.8.3, as just confirmed with a test. A screenshot is available for confirmation.
Could this idea be changed back to Open?
I don't see this one happening @Bud . Regardless of the discussion/debate that can be had over how situations like this should be handled by code, any code, Esri made its decision many many years ago how their tools handle this situation. At a minimum, backwards compatibility and workflow reproducibility prevent such a change from being implemented, but Esri has no intention of changing the behavior so debating impacts is moot.
I happen to agree with Esri's decision with how the case of no condition is handled. In SQL, if you leave a WHERE clause out of a statement than all records are returned. A SQL WHERE clause is about filtering or reducing the size of the result set. Leaving the box empty in the tool is effectively saying there is no WHERE clause, therefore all records are returned. Looking to Introduction to query expressions—ArcGIS Pro | Documentation
Queries are used to search for and select a subset of features and table records.
The expression is about selecting, one could say filtering, for a subset of features or records. If there is no condition or filter, then everything is returned.
Hi @Bud I wanted to reach out to acknowledge that we have re-reviewed this idea in light of the usability bug being closed as As Designed. Joshua outlined the reasoning perfectly and after reviewing with the team here, we don't have anything to add. Since the idea requests for a blank SQL query to not select all rows, and we have no intention of changing how SQL works, we will leave this idea closed.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.