update dbo.Sheet1$ set F01 = 0 where ID in(
select top 3 ID from dbo.Sheet1$ where ID in(
select ID, ISNULL(F01,0) + ISNULL(F02,0) + ISNULL(F03,0) as RowSum
from dbo.Sheet1$ where F01 = 1 AND F02 = 1 order by RowSum desc))
Running this code I get the error message:
Msg 1033, Level 15, State 1, Line 1 The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP, OFFSET or FOR XML is also specified.
can I write another query that exactly does the same like above query?