![]() |
|
Archives of the TeradataForumMessage Posted: Fri, 28 Apr 2006 @ 11:42:30 GMT
I don't know if I really understand your needs... But try this...
select a.col1,a.col2,a.col3,case when (dist_val)=1 then col3 else 8 end
from tabA a
inner join
(select col1,count(distinct col3) as dist_val
from tabA
group by 1) b
on a.col1=b.col1
Andrea Cappelli
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||