![]() |
|
Archives of the TeradataForumMessage Posted: Mon, 14 Aug 2006 @ 09:15:10 GMT
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
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||