Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 23 Apr 2015 @ 13:00:37 GMT


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


Subj:   Subtracting two TIMESTAMP
 
From:   Anomy Anom

<-- Anonymously Posted: Thursday, April 23, 2015 06:56 -->

Hi All,

I have an requirement to subtract two timestamp to calculate the time taken value.

Time stamp values are below

     Table.end time= 2015-03-22 23:06:36
     Table.start time = 2015-03-22 23:01:53

So I use below query and it works fine with SQL assistant whereas in BTEQ it throws error

     Select (Table.end_time - Table.start time) HOUR TO SECOND(0) as "Time_Taken"
     from table --- This works good in SQLA but not working in BTEQ

What am I doing wrong, Please help!!


Thanks



     
  <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