If you’re getting an error that reads “A TOP can not be used in the same query or sub-query as a OFFSET” when running a query in SQL Server, it’s probably because you’re using the TOP() clause and the OFFSET clause in the same query or sub-query.
We can’t use the TOP() clause and the OFFSET clause in the same query in SQL Server.
Below are three options for fixing this error.