Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 12 Jul 2006 @ 22:53:35 GMT


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


Subj:   Re: Error with timestamp calculation
 
From:   Flavio Sobral

Hi Victor,

Regarting item 2, I did exactly the same and works fine.

The problem comes when the calculation goes to the previous day.

Look for this.

     select z.x A
     ,         z.x + cast ('0.000001' as interval second) B
     ,         z.x -  cast ('0.000001' as interval second) C
     ,         current_timestamp - cast ('000 00:00:00.000001' AS INTERVAL DAY(4) TO SECOND(6) ) D
     --,       Z.x - cast ('000 00:00:00.000001' AS INTERVAL DAY(4) TO SECOND(6)) E
     from
             (
               select cast ('2000-12-31 00:00:00.000000+00:00' as timestamp(6)with time zone  ) X
              )   Z

     Columns,
     A,B,C and D are OK, but when add the E column the query returns error.

Regards,

Flavio Sobral



     
  <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