Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 06 May 2008 @ 16:44:01 GMT


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


Subj:   Re: Change in casting to Interval
 
From:   Dieter Noeth

Anomy.Anom wrote:
  I�m trying to find some documentation as to why casting the date difference as an interval year(4) no longer works as it had previously.  


  I think that we had recently changed to VERSION 06.02.02.26 RELEASE V2R.06.02.02.25.  


  This used to return 7 and after the change it returns 8.  


          > Select ((1080505(date)) - (1000704(date))) year(4);
  This was really useful to determining the age in years, it�s not anymore.  


It's a feature, not a bug ;-)

It was introduced in 6.2 (based on DR 96278) and changed almost any result based on interval calculation. There was a Tech Alert on it, too.

In your case it's the same as

     extract(year from first_date) - extract(year from second_date)

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