Select to view content in your preferred language

Make Query Table — Sort data (and then generate dynamic OBJECTID)

385
0
09-17-2024 08:17 AM
Status: Open
Labels (1)
Bud
by
Esteemed Contributor

ArcGIS Pro 2.9.5; file geodatabase

The Make Query Table geoprocessing tool can generate an OBJECTID column on the fly (dynamic).

Bud_0-1726585556108.png

If the tool could sort (descending) on a field like POPULATION before generating the OBJECTID column, then that might give us a way to solve the "FGDB: select cities with top 4 population" problem: What tool can select the records with the highest values in a particular field? We could do a Select By Attributes WHERE OBJECTID <= 4.
That wouldn't work on the unsorted source table, but it would work on the Make Query Table feature layer since the data was sorted (descending) by POPULATION, and then an OBJECTID field was dynamically generated afterward.

Could a Sort (Ascending/Descending) geoprocessing parameter be added to the Make Query Table geoprocessing tool?

For reference, here is a comparison of the different feature layer/table view geoprocessing tools: 
https://community.esri.com/t5/arcgis-pro-ideas/consistent-visible-sql-expressions-and-query/idc-p/13...