Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 03 Jan 2006 @ 21:10:07 GMT


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


Subj:   Re: CEIL & Least function in TD
 
From:   Kodumur, Gopi

Partho,

     select

     ((case

     when cast('31-dec-2005' as date format 'dd-mmm-yyyy')-date > 0

     then

     date

     else

     cast('31-dec-2005' as date format 'dd-mmm-yyyy')

     end )-due_date)

This should help to get the least but, arthmetica opperation on date will always lead to integer value so no need to use a ceil fucntion.

in case you are using timestamp, you need to add

     ( (above) + .999999999 ) as integer).

Hope this works for you..


Thanks,

Gopi



     
  <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