Does anyone have an example of the correct syntax to be able to number the rows in a query?
It would be sincerely appreciated.
Does anyone have an example of the correct syntax to be able to number the rows in a query?
It would be sincerely appreciated.
So I have a calculated field in the Epicor10 BAQ and put this in OrderDtl.SysRowID_RowNum but saying it is invalid. There are quite a few tables joined in this query but I am sure the SysRowID is unique to all rows.
row_number() over (partition by table.field, table.field etc order by table.field asc)
You use the groupings if for what you want to group by (you might be able to skip that if you literally only want row numbers) and order by is what the numbering uses to order by. You can also add asc or dec for which way you want the order to go by.
Did you ever get this resolved? Trying to do the same thing to just number the number of rows returned in the query displayed at the time of retrieval.
Could not use sysrowid. Had to go another route.
Not sure what exactly you need, but this would give you row numbers for each baq line result
row_number() over(order by field you want to sort it)