Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Mon, 14 Aug 2006 @ 09:15:10 GMT





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




Subj:   Re: Help needed with SQL problem
 
From:   ulrich arndt



You are writing "all of this would be in one column" but you example below shows three...

This (pseudo code - not tested) will create one column...

     select case when id = 1 then trim(col1) else trim(col2) end as col3
     from table a
          join
          (select calendar_date - current_date as id
           from sys_calendar.calendar
           where id between 1 and 2
          ) as r
          on 1=1
     ;

Ulrich





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