Question
· Mar 25, 2021

How to get the row number in an SQL query?

Hi,

 

I'm doing a query in SQL and I need to sort my data by some non-repeated field.

 

Unfortunately, my data is grouped in a way that I cannot guarantee that any column will not have repeated data, so one solution would be to take the row number.

 

Also, the Cache is not accepting Row_Number () in my querry and I would like to know if there is another solution to return line numbers or some way to add this function to the Cache.

 

Best regards.

Product version: Caché 2018.1
$ZV: Cache for Windows (x86-64) 2018.1.3 (Build 414U)
Discussion (7)3
Log in or sign up to continue