• Order by is not honoured anywhere other than in the outer-most select statement, that is, the one that selects from the view. This is not a bug, it's intentional. The fix is to move the Order By from the view into the select that queries the views.

    It was a bug in SQL 2000 that resulted in views returning data ordered. The bug was fixed in SQL 2005.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass