The ORDER BY clause is not valid in views, inline functions, derived tables, and subqueries, unless either the TOP or OFFSET and FETCH clauses are also specified. It hasn't been in a long time. It shouldn't have worked in 2008 either. https://msdn.microsoft.com/en-us/library/ms188385(v=sql.100).aspx