Is it possible to get the ROW NUMBER of a query?
I see LLBL generates a paginated query like below. I like to include the "__rowcnt" field to my Entity object. I have no idea if there a way to achieve it.
WITH __actualSet AS
( SELECT *, ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) AS __rowcnt
FROM (SELECT DISTINCT TOP 20 ...
FROM ...
WHERE ...
ORDER BY ... ASC) AS _tmpSet)
SELECT ...
FROM __actualSet
WHERE [__rowcnt] > @__rownoStart AND [__rowcnt] <= @__rownoEnd
ORDER BY [__rowcnt] ASC