Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 23 Apr 2013 @ 21:46:48 GMT


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


Subj:   Re: Can the ROW_NUMBER data type be changed?
 
From:   Dieter Noeth

BOB DUELL wrote:

  An interesting question today on Stack Overflow revealed that the data type used with the Teradata ROW_NUMBER() function is INTEGER while many other DBMS systems use BIGINT. That apparently breaks when there are more than 2.1 billion rows in the window.  


  Without dealing with the other merits of the question (like why in the world are you doing this), is there some way to increase the precision of ROW_NUMBER()?  


I can't test it right now (and i definitely would try to avoid running a ROW_NUMBER on > 2.100.000.000 rows), but it might be similar to COUNT:

     CAST(ROW_NUMBER.... AS BIGINT)

Who is going to test it?

;-)

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