CREATE OR REPLACE VIEW SD_HOSPITAL.VW_YS_ZLDCYP
 (
 ZLXMID, YPNM00, YPZSL0, SFKSLY, MZFYDW, M2J000, ZSL000, YPGG00, YPMC00, 
ZLXMJC, YYID00, NSBL00, MCSL00, YYSJ00, PCID00, YFID00, JLDW00, PCMC00, 
YPYFMC, PLXH00

 )
 AS 
select a.ZLXMID,a.YPNM00,a.YPZSL0, a.SFKSLY, b.MZFYDW, b.M2J000,
       a.YPZSL0/M2J000 ZSL000, b.YPGG00, b.YPMC00, c.ZLXMJC, a.YYID00,b.NSBL00,
       A.MCSL00,A.YYSJ00,A.PCID00,A.YFID00,B.JLDW00,
       (select X.PCMC00 from BM_PC0000 X where X.PCID00=A.PCID00) PCMC00,
       (select X.YPYFMC from BM_YPYF00 X where X.YFID00=A.YFID00) YPYFMC,A.ROWID PLXH00
from   XT_ZLDCYP a,bm_yd0000 b,bm_zlzd00 c
where  a.zlxmid=c.zlxmid and a.ypnm00=b.ypnm00 AND B.TZRQ00 IS NULL
/
