Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Mon, 20 Dec 2004 @ 15:01:09 GMT

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

Subj:   Re: Interval in a where clause
From:   Victor Sokovin

              ,(EndDateTime - StartDatetime) DAY(4) as Difference

          From MyTable

          Where Difference <= 7
  Now this returns a 5407 error which is expected because the result set is an INTERVAL  

Try to "extract" the days from the interval:

     where EXTRACT(DAY from (Second_EntryDateTime - First_EntryDateTime DAY(4)=)) <= 7 .

In a similar way it is possible to extract all elements from dates and intervals.



  <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: 23 Jun 2019