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
@

 

Post a comment

mail.png


相似文章|Related Entries

最近更新|Recent Entries

不定期更新|Handy Entries

相似标签|Related Tags

分类栏目|Categories

按月归档|By Month

2008
11
10
07
05
04
03
02
01
2007
12
10
07
06
05
04
03
02
01
2006
12
11
10
09
08
07
06
05
04
03
02
01
2005
11
10
09
08
07
04
03
2004
12
11
10
09
08
07
06
05
04
03
02
01
2003
12
10
09
08
06
2002
09
08
04
03
02
2001
12
09
07
06
05

站内链接|Site Links

Powered by
Movable Type 3.34