SQL Server Home
[SQL2008 CTP5] View designer allows specification of sort order
as Won't Fix
12/13/2007 3:10:16 AM
User(s) can reproduce this bug
When using the view designer in SQL Server Management Studio, one can specify to order the results in ascending or descending order of the columns included. This is wrong from a theoretic POV (as in the relational model, view , like tables, are unordered by definition). It is also incorrect from a practical POV, since there is no supported syntax in SQL Server to create a view with a defined sorting order.
SQL Server 2008 November CTP
Tools (SSMS, Agent, Profiler, etc.)
Win2003 Enterprise Server (SP2)
Operating System Language
Steps to Reproduce
1. Open SSMS
2. Right-click "Views" in object explorer
3. Choose "New view..."
4. In the Add Table dialog, select a table, click "Add" and then "Close".
5. Observe the presence of two columns "Sort Type" and "Sort Order".
6. Check at least one column from the table in the upper pane to add it to the grid in the middle pane.
7. Click in the "Sort Type" column and set it to either "Ascending" or "Descending".
No error message.
Error message: "The ORDER BY clause is invalid in views" (or similar).
Or better: disable or hide the "Sort Type" and "Sort Order" columns in the design grid.
to post a comment.
Please enter a comment.
on 7/3/2011 at 10:23 PM
Thanks much for your feedback and recommendation.
However, given the work that would be involved in implementing this work, and triaging against our current set of deliverables, we do not think, we would be able to get to this in the near future.
SQL Server Team
on 12/20/2007 at 8:54 AM
Hello Hugo Kornelis,
Thank you for reporting the problem. The sorting order for VIEWS as you say does not guarantee sorted order. We will try to address this problem in the coming release of SQL Server.
to post a workaround.
Please enter a workaround.
© 2014 Microsoft