-- Start of DDL Script for View SD_HOSPITAL.VW_BQ_KSXX_MZDZBL -- Generated 2021-06-18 11:18:10 from SD_HOSPITAL@30 CREATE OR REPLACE VIEW vw_bq_ksxx_mzdzbl ( ksmc00, bqh000, ksh000, cjr000, cjrqsj, xgr000, xgrqsj, yxbz00, pysm00, wbsm00, pxxh00 ) AS select (select BMMC00 from BM_BMBM00 where BMBH00=a.KSH000 and BMXZ00='0' and CZBZ00<>'2' and FLAG00='1') as Ksmc00, a."BQH000",a."KSH000",a."CJR000",a."CJRQSJ",a."XGR000",a."XGRQSJ",a."YXBZ00", (select PYSM00 from Bm_Bmbm00 where BMBH00=a.KSH000 and BMXZ00='0' and CZBZ00<>'2' and FLAG00='1') as PYSM00, (select WBSM00 from BM_BMBM00 where BMBH00=a.KSH000 and BMXZ00='0' and CZBZ00<>'2' and FLAG00='1') as WBSM00, (select PXXH00 from BM_BMBM00 where BMBH00=a.KSH000 and BMXZ00='0' and CZBZ00<>'2' and FLAG00='1') as PXXH00 from BM_BQKS00 a,BM_BMBM00 B where A.KSH000=B.bmbh00 AND BMXZ00='0' and CZBZ00<>'2' and FLAG00='1' AND YXBZ00 = 1 order by PXXH00 / -- End of DDL Script for View SD_HOSPITAL.VW_BQ_KSXX_MZDZBL