Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 28 Aug 2007 @ 09:36:53 GMT


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


Subj:   Adding the value of a table column(integer) to current_timestamp
 
From:   Mohd Suhail

Hi All,

I have a table 'test' that contains a single integer column 'col1'.The column 'col1' contains values like 1,2,3,4,5....etc

I need to add the value of col1(as seconds) to the current_timestamp(0). I tried this query previously:

     select cast((current_timestamp(0) + interval '1' second)
               as timestamp(0)).

The above query works fine for constant values. But the following queries do not work:

     select cast((current_timestamp(0) + interval 'col1' second)
               as timestamp(0)) from test

or

     select cast((current_timestamp(0) + interval col1 second)
              as timestamp(0)) from test

Can anyone help me in this


Thanks and Regards,

Suhail



     
  <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