Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 04 Oct 2002 @ 13:57:02 GMT


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


Subj:   Re: Numbering records (simple question)
 
From:   Berghuis, Frank

I use CSUM for this:

csum(1,, )

Generates a numbered column, with the number in the order of first, and second. You can specify ascending and descending on the columns. Also, if you 'group by ' it will restart the numbering at 1, each time the value in changes. Examples: sel csum(1,tablekind asc, databasename desc) ranking ,databasename, tablename, tablekind, creatorname from dbc.tables where tablename like '%290%' group by tablekind



     
  <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