CREATE OR REPLACE VIEW vw_zs_zlzd00 (
   zlxmid,
   zlxmbh,
   lbbz00,
   fbzxbz,
   zlxmjc,
   gdxmbz,
   jgdw00,
   ckz000,
   dw0000,
   wbsm00,
   pysm00,
   lbbh00,
   xxms00,
   bz0000,
   qyrq00,
   tzrq00,
   sfyxsq,
   zxks00,
   dlbqzx,
   dlkszx,
   bqsfbz,
   bqdybz,
   bbid00,
   ssdjbh,
   cm3000,
   zyzbid,
   sfje00 )
AS
select z.ZLXMID,z.ZLXMBH,z.LBBZ00,z.FBZXBZ,z.ZLXMJC,z.GDXMBZ,z.JGDW00,z.CKZ000,z.DW0000,
       z.WBSM00,z.PYSM00,z.LBBH00,z.XXMS00,z.BZ0000,z.QYRQ00,z.TZRQ00,z.SFYXSQ,z.ZXKS00,
       z.DLBQZX,z.DLKSZX,z.BQSFBZ,z.BQDYBZ,z.BBID00,z.SSDJBH,z.CM3000,z.ZYZBID,a.sfje00

from   bm_zlzd00 z, VW_ZS_zlxmsf_NEW a  
where  z.zlxmid=a.zlxmid(+) and  z.sfyxsq='Y' and z.zlxmid>100
       and nvl(z.tzrq00,to_char(sysdate+1,'yyyymmdd'))>to_char(sysdate,'yyyymmdd')
       and nvl(z.qyrq00,to_char(sysdate+1,'yyyymmdd'))<=to_char(sysdate,'yyyymmdd')
/


-- End of DDL Script for View SD_HOSPITAL.VW_ZS_ZLZD00

