https://luizlima.net/casos-do-dia-a-dia-next-value-for-function-cannot-be-used-if-rowcount-option-has-been-set-or-the-query-contains-top-or-offset/
Casos do Dia a Dia – NEXT VALUE FOR function cannot be used if ROWCOUNT option has been set, or the query contains TOP or OFFSET