Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sun, 16 Mar 2003 @ 20:52:34 GMT


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


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

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

still the same error:

3707: Syntax error, expected something like an 'END' keyword between ')' and the 'MONTH' keyword.



     
  <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