ArcGIS Pro 3.2.1; file geodatabase
In Select by Attributes, this works:
objectid in (
select
objectid
from
species_records)
But this doesn't work:
objectid in (
select
objectid+0
from
species_records)
ERROR 000358: Invalid expression
Likewise, any other SQL expression throws the same error, including expressions on text or date fields.
Why does a SQL expression in the SELECT clause of a subquery throw an error in Select By Attributes?
I don't have that problem in mobile or enterprise geodatabases, only file geodatabases.
My example in this post is oversimplified for the purpose of demonstrating the issue. My real use case is to use Select By Attributes to select the greatest 1 per group (ties or no ties).
Related idea: FGDB Select By Attributes — Expressions in subquery SELECT clause