It would be helpful if we could control the logic used for getting the records on the many side of [one-to-first] joins.
For example, choose an ORDER BY field: Grab the related record with the latest date, or the largest integer, etc. Specify ascending or descending order.
Even better, make it a user-defined ORDER BY sql clause, so that we can use specialized logic like:
Related: Choose if join will be 1:1 or 1:Many
Possible workarounds:
Since one-to-first joins use the related record that has the lowest OBJECTID, we could consider sorting the rows for each grouping/common ID, along with generating a new OBJECTID on the sorted data, using techniques like:
select cast(rownum as int) as objectid, --Fake OBJECTID. Uses sorted subquery. a1, b1 from (select a1, b1 from table_1 order by a1, b1 desc)
ROW_NUMBER function in FGDB SQL
https://community.esri.com/t5/arcgis-pro-ideas/row-number-function-in-fgdb-sql/idc-p/1526715/highlig...
Related:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.