Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 11 Apr 2011 @ 09:08:40 GMT


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


Subj:   CAST INTERVAL to time gives 5407 error
 
From:   Anomy Anom

<-- Anonymously Posted: Monday, April 11, 2011 04:51 -->

Dear colleagues,

I have an SQL that calculates me the TotalElapsed time of a job. (not special actually, except that it must take into account that jobs run in parallel)

To be short, I want to insert this 'TotalElapsTime' info into a separate table that I can use for runtime analysis purposes.

In the target table, the field that must hold the total elapstime is defined as TIME(0).

When I execute my query as a SELECT it works fine.

Normally I would expect it to work when I put the INSERT INTO target table in front of it but I always gives me the following error:

5407: Invalid operation on an ANSI DateTime or interval value


In my SQL the calculated field is an INTERVAL HOUR(2) TO SECOND(0). I tried to cast it to TIME but it doesn't work.

Any got an idea on how the get this INTERVAL HOUR(2) TO SECOND(0) into a TIME?


Many 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