• The actual problem is that a view is conceptuallly equal to a table - that is, it has no implied sort order. The only way to be sure to get the rows in the required order is to use an ORDER BY in the final SELECT.

    The TOP 100 PERCENT / ORDER BY "trick" has never been documented or supported. It just "happened" to work that way - and when it "happened" to work another way, in SQL 2005, lots of badly coded apps experienced failures.

    Your article promotes the use of a new "trick" that is not documented or supported but just "happens" to work that way on SQL 2005 - stop for a while and consider what willl happen after the move to SQL 2008. What if this trick stops working?

    Frankly, I am apalled that this article was even published here on SQL Server Central. I voted "awful" and I hope that Steve will decide to pull it.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/