Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

You need to create a view to increase... Expand / Collapse
Author
Message
Posted Tuesday, May 13, 2008 4:51 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: 2 days ago @ 7:24 PM
Points: 33,930, Visits: 18,039
Comments posted to this topic are about the item You need to create a view to increase...






Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #500064
Posted Sunday, February 17, 2013 5:54 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Yesterday @ 2:30 AM
Points: 9,530, Visits: 11,517
While this is the only way to create a view (including all the table's rows and) having an order by clause at the top level select in its definition, it doesn't necessarily follw that rows will be returned in that order when selected from the view unless the order clause is repeated at the level abobe the view.
So the chances are that this view does nothing for usability (and hence nothing useful at all).


Tom
Post #1420968
Posted Wednesday, December 23, 2015 6:03 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 5:37 AM
Points: 7,886, Visits: 763
TomThomson (2/17/2013)
While this is the only way to create a view (including all the table's rows and) having an order by clause at the top level select in its definition, it doesn't necessarily follw that rows will be returned in that order when selected from the view unless the order clause is repeated at the level abobe the view.
So the chances are that this view does nothing for usability (and hence nothing useful at all).
Thanks for the clarity on that. At first I thought I just discovered how to accomplish this in a view and then learn from you that I still have to query the data with an order by clause anyway. Oh well.
Post #1747395
Posted Thursday, December 24, 2015 5:56 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Yesterday @ 2:30 AM
Points: 9,530, Visits: 11,517
Iwas Bornready (12/23/2015)
TomThomson (2/17/2013)
While this is the only way to create a view (including all the table's rows and) having an order by clause at the top level select in its definition, it doesn't necessarily follw that rows will be returned in that order when selected from the view unless the order clause is repeated at the level abobe the view.
So the chances are that this view does nothing for usability (and hence nothing useful at all).
Thanks for the clarity on that. At first I thought I just discovered how to accomplish this in a view and then learn from you that I still have to query the data with an order by clause anyway. Oh well.

Actually there's a reasonable chance that the data will come back in that order. Of course they might not. Even worse, they might do so this week and not do so next week when the number of rows in the table or the amount of buffer space or something else has changed and made the optimizer do things differently.


Tom
Post #1747643
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse