Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 28 Jan 2008 @ 11:02:08 GMT


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


Subj:   Re: Sorting of a Select
 
From:   Prescott, Kyle R

You can always cheat by using an Ordered OLAP function like row_number and a qualify statement and compare it greater than zero. By function definition all the rows will qualify, but it also can be "ordered" the way you would like.

Example - order the calendar table descending by date

     SELECT *
     FROM sys_calendar.calendar
     QUALIFY (ROW_NUMBER() OVER(ORDER BY calendar_date DESC) > 0);

Kyle Prescott | Database Administrator



     
  <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