When you run an INSERT ... SELECT statement in Microsoft Analytics Platform System (APS) 2016 or a later version of APS and that statement includes an ORDER BY clause, you receive an error message that resembles the following:
Msg 104381, Level 16, State 1, Line 26
The ORDER BY clause is invalid in views, CREATE TABLE AS SELECT, INSERT SELECT,
inline functions, derived tables, subqueries, and common table expressions,
unless TOP or FOR XML is also specified.
This issue occurs because sort operations aren't valid with the INSERT ... SELECT statement. This is by design.
To fix this problem, remove the ORDER BY clause from the statement.
In earlier versions of APS, no error may have been returned. However, the ORDER BY clause was not honored.