Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Tue, 28 Aug 2007 @ 13:49:55 GMT





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




Subj:   Re: Adding the value of a table column(integer) to current_timestamp
 
From:   Anomy Anom



<-- Anonymously Posted: Tuesday, August 28, 2007 06:52 -->

For values up to 9999, you can simply

     Select cast(current_timestamp(0) + (interval '1' second)*col1)
               as timestamp(0)) from test;

Up to 9999 minutes 59 seconds (a bit less than a week),

     Select cast(current_timestamp(0) + (interval '1' minute)
               *(col1/60) + (interval '1' second)
               *(col1 MOD 60) as timestamp(0)) from test;

And so forth...





     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
 
  Top Home Join Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky 
Last Modified: 24 Aug 2008