Hi @ajks
You can just remove the ORDER BY clause in views, inline functions, derived tables, subqueries, and common table expressions.
Or, as the error message said, specify TOP like this:
SELECT TOP (100) PERCENT ... FROM ... ORDER BY column
Or OFFSET like this:
SELECT ... FROM ... ORDER BY column OFFSET 0 ROWS;
Best regards,
Percy Tang
If the answer is the right solution, please click "Accept Answer". If you have extra questions about this answer, please click "Comment".