Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 17 Jul 2006 @ 21:11:47 GMT


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


Subj:   Re: How to get top N records
 
From:   de Wet, Johannes

Bhakti,

Why do you not want to use RANK? Can you use any of the other OLAP functions?

Try this.

     SELECT
         Day_of_Calendar * 2 + 12345 AS MyVal
        ,CSUM(1, MyVal) AS MyRank
     FROM
        sys_calendar.calendar
     QUALIFY MyRank < 50;

Johannes de Wet
UnumProvident Corportaion



     
  <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: 15 Jun 2023