Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Tue, 29 Apr 2008 @ 22:18:26 GMT





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




Subj:   Re: Case Statement and Crystal Reports
 
From:   John Hall



With apologies: In the OP's SQL, the asterisks result from the conversion of an HTML note to plain-text (the TeradataForum restricts posts to plain-text). Those asterisks should of have been stripped, but weren't.

The corrected SQL:

     (case when (extract(day from current_date)) = 1 then
                         (SNPSHT_DT between (add_months((current_date-
     extract(day from current_date)+1),-1)) and (current_date -
     extract(day from current_date))) else
                         (SNPSHT_DT >(current_date - extract(day from
     current_date))) end)




     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
 
  Top Home Join Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky 
Last Modified: 01 Sep 2008