Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Wed, 27 Jun 2013 @ 00:38:59 GMT


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


Subj:   Re: Compare Fields in Separate Records
 
From:   Myrna, James

Jerry,

Without spending much time on this or knowing the table structure, I can only suggest looking at the Ordered Analytical Functions for a possible solution. Something like:

     (D_date - MAX(A_date) over (partition by patient order by A_date rows
     between 1 preceding and 1 preceding)

Regards,

Jim



     
  <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: 24 Jul 2020