create view zytst.v as
select (case t.c1 when ... then ... end) as vc1,
(case vc1 when ... then ... end) as vc2
from zytst.t
@
this statement does not work, because vc1 is an unavailable reference. Use following code instead.
create view zytst.v as
with tmp as
(select (case t.c1 when ... then ... end) as vc1
from zytst.t)
select vc1 as vc1,
(case vc1 when ... then ... end) as vc2
from tmp
@


