Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 02 Jan 2008 @ 15:09:59 GMT


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


Subj:   Re: Finding previous value
 
From:   Rob Paller

You can use the MIN or MAX window aggregates and specify ROWS BETWEEN 1 FOLLOWING and 1 FOLLOWING or ROWS BETWEEN 1 PRECEDING and 1 PRECEDING to get either the subsequent or preceding values, respectively.

Your example is vague as you don't indicate how the ADVC_NUM is assigned and the effective dates are the same making it difficult to determine how to order your partition.

Hope this helps.


Regards,

Rob



     
  <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