Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 29 Apr 2008 @ 23:42:23 GMT


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


Subj:   Re: Case Statement and Crystal Reports
 
From:   Curley, David

Oops - that second case should be "then current_date" not "then current_date -1"

     SNPSHT_DT between
     Case
        when extract(day from current_date)) = 1 then add_months(current_date, -1)
        else cast(current_date/100 * 100 + 1 as date)
     end
     And
     Case
        when extract(day from current_date)) = 1 then current_date
        else SNPSHT_DT
     end

Dave



     
  <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