CREATE OR REPLACE VIEW SD_HOSPITAL.VW_ZS_YD0000
 (
 YPNM00, YKBMBH, YPBM00, YPGBM0, YZYYP0, PYSM00, WBSM00, YPMC00, YPGG00, 
YPSYSM, YPJCL0, KCDW00, JLDW00, ZYFYDW, MZFYDW, K2J000, Z2J000, M2J000, 
PFJ000, LSJ000, ZBJ000, GJJ000, GJPJDJ, GJZJE0, GJZSL0, CYJL00, KCSX00, 
KCXX00, KCSL00, KCJE00, PDXH00, SFKYYY, SFZBYP, SFPSYY, QZFS00, CFJB00, 
GZDJ00, MZDJ00, DPDJ00, SJDJ00, CFWZ00, LBBH00, YLBH00, JXBH00, QYRQ00, 
TZRQ00, DXSYBZ, KCGJJE, YFID00, PCID00, CYL000, ZQS000, ZJBZ00, YPTYM0, 
LSDJ00, KSSJB0, ZJJL2J, ZJJLDW, MZKFDW, F2J000, YPCZFL, NSBL00

 )
 AS 
select y.ypnm00,y.ykbmbh,y.ypbm00,y.ypgbm0,y.yzyyp0,y.pysm00,y.wbsm00,y.ypmc00,y.ypgg00,y.ypsysm,
       y.ypjcl0,trim(y.kcdw00)kcdw00,trim(y.jldw00)jldw00,trim(y.zyfydw)zyfydw,trim(y.mzfydw)mzfydw,
       y.k2j000,y.z2j000,y.m2j000,y.pfj000,y.lsj000,
       y.zbj000,y.gjj000,y.gjpjdj,y.gjzje0,y.gjzsl0,y.cyjl00,y.kcsx00,y.kcxx00,y.kcsl00,y.kcje00,
       y.pdxh00,y.sfkyyy,y.sfzbyp,y.sfpsyy,y.qzfs00,y.cfjb00,y.gzdj00,y.mzdj00,y.dpdj00,y.sjdj00,
       y.cfwz00,y.lbbh00,y.ylbh00,y.jxbh00,y.qyrq00,y.tzrq00,y.dxsybz,y.kcgjje,y.yfid00,
       y.pcid00,y.cyl000,y.zqs000,y.zjbz00,y.yptym0,
       decode(substr(to_char(y.LSJ000/(y.K2J000*y.NSBL00)*y.Z2J000),1,1),'.','0','')
       ||to_char(round(y.LSJ000/(y.K2J000*y.NSBL00)*y.Z2J000,4))||'/'||y.ZYFYDW LSDJ00,
       y.KSSJB0,y.zjjl2j,y.zjjldw,y.mzkfdw,y.f2j000,y.ypczfl ,y.nsbl00
from bm_yd0000 y where pdxh00>'0' and TZRQ00 is null
/
