Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 28 Jan 2008 @ 13:04:21 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Sorting of a Select
 
From:   Victor Sokovin

  Also, do you know of any database platforms that do allow views to be created with an ORDER BY clause? Does SQL Server, Oracle, DB2, etc. allow this or something?  


Oracle accepts ORDER BY in (inline) view definitions and subqueries starting from version 8i but I don't think they guarantee any specific ordering in the "final" query's result set unless ORDER BY is also specified in that final query as well. The use of these features is tricky and does not always work well.

SQL Server would refuse ORDER BY in views except if it comes together with TOP N or FOR XML (the latter was added in the 2005 version of the product) clauses. Again, no guarantee that the final ordering will be respected.

BTW, TOP N and ORDER BY have been added in Teradata in R6 view definitions but I don't think they will help in this thread.


Victor



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016