Babelfish error on OFFSET syntax

0

We faced the below error when run query with offset ... rows.. fetch next...

Msg 33557097, Level 16, State 1, Line 57
syntax error at or near "ROWS"
Total execution time: 00:02:42.886

This error occurs in the pagination part of the query:

OFFSET @REGISTROS_POR_PAGINA * (@PAGINA - 1) ROWS 
FETCH NEXT @REGISTROS_POR_PAGINA ROWS ONLY

The declarations are like this:

DECLARE @PAGINA INT = 1;
DECLARE @REGISTROS_POR_PAGINA INT = 2147483646;

NOTE: The query syntax is correct, it runs normally in SQL Server (on premises)

AWS
feita há 5 meses76 visualizações
Sem respostas

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas