Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sun, 16 Mar 2003 @ 20:35:13 GMT


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


Subj:   Re: SQL to calculate tenure in months
 
From:   Burton, Bruce

Thanks Dieter.

Sorry to beat this to death but...

I have '0001-01-01' dates on the database which is causing an overflow on the interval. I am trying to use case logic to no avail:

select date '2003-01-31' as month_end, orgnl_srv_dt,
case when orgnl_srv_dt < '1960-01-01' then 0
else (month_end - orgnl_srv_dt) month(4)
end as tenure
from edwviews.subsrptn

Any ideas why case logic won't work on an interval the way it is coded above? Any suggestions on how to fix the case?


Thanks,

Bruce



     
  <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