Home Forums SQL Server 2012 SQL Server 2012 - T-SQL Sorting working differently after moving from SQL Server 2008 to 2012 RE: Sorting working differently after moving from SQL Server 2008 to 2012

  • 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

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2