Search

[SQL2008 CTP5] View designer allows specification of sort order by Hugo Kornelis

Closed
as Won't Fix Help for as Won't Fix

4
0
Sign in
to vote
Type: Bug
ID: 317249
Opened: 12/13/2007 3:10:16 AM
Access Restriction: Public
0
Workaround(s)
1
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.
Details (expand)
Product Language
English

Version

SQL Server 2008 November CTP

Category

Tools (SSMS, Agent, Profiler, etc.)

Operating System

Win2003 Enterprise Server (SP2)
Operating System Language
US English
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".
Actual Results
No error message.
Expected Results
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.

Platform

32
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 7/3/2011 at 10:23 PM
Hi Hugo,

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.

Thanks again,

Nikhil
SQL Server Team
Posted by Microsoft 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.

Regards
Karthik
Sign in to post a workaround.