Is there anyway to display the equivalent of what SELECT ROW_NUMBER() OVER() does in MS SQL' that is to populate the first column of a results set with the row number of each result?
This is currently not supported but we've documented this as a potential future enhancement. One workaround is to perform queries via a linked server (MSSQL) and then use the T-SQL support for this functionality. An example is here:
Row Numbering PI Data (with PIOLEDB and MSSQL Server)
Depending on the client application/environment, it may be easy to add row numbers to the result set after the query is returned. If you can describe the use case more, there may be other alternatives to try.
Did Barry’s proposed solution worked for you?
If so you can mark it as correct answer, otherwise please let us know if you if you have more questions or what you did to solve your problem.
Retrieving data ...