Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 12 Apr 2006 @ 11:47:52 GMT


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


Subj:   Re: Building row numbers
 
From:   Dieter Noeth

Chaim Sender wrote:

  Does anyone have an alternative way of creating row numbers using Teradata SQL other than using csum(1,1) as below?  


          > INS DB.Test SEL
          > Name,ProductNumber,csum(1,1) as RowNumber
          > FROM ABC.Atable

*Never* use CSUM(1,1), because it will be totally skewed.

Since V2R5 there's a SQL:1999 compliant ROW_NUMBER() OVER (ORDER BY ...)


Dieter



     
  <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