Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 15 Sep 2011 @ 16:02:25 GMT


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


Subj:   Re: Mdiff on Date field
 
From:   Dieter Noeth

Anomy.Anom wrote:

  However could you pl explain what is the significance of using " rows between 1 preceding and 1 preceding" in the query.  


  Is it required to specify "1 preceding" two times?  


"rows between 1 preceding and 1 preceding" is used to access the previous row's data. But "rows 1 preceding" equals "rows between 1 preceding and current row". This will return the minimum value of the previous and the current row and the result for the first row will differ:

     ID    date
       1    28-Jan     null   vs.    0
       1    31-Jan        3          3

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