Archives of the TeradataForum
Message Posted: Wed, 14 Jul 2004 @ 17:04:56 GMT
Subj: | | Re: Changing a column name while concatinating |
|
From: | | Nomula, Madhukar |
Ok but now NEW_CUST_NAME is not what i wanted. i want NEW_CUST_NAME = customer name (or some modified customer name) which i can use in the
same select statement.
select (customername || 'abc') as NEW_CUST_NAME || custid || (case when
NEW_CUST_NAME = 'something' then 1 else 0 end)
from customer;
This won't work simply becaz i am changing the column (customername || 'abc') as NEW_CUST_NAME. In my situation (customername || 'abc')
is a big 20line case statement which i am using in 5 other case statements of the same select staement.
|