create or replace view vw_zs_dzbfhzdxx as
select distinct a.BQBMID,a.DBZBM0,a.DBZMC0,a.YBZXLB,a.YBBRLB,a.BRLBMC,SSCZBM,SSCZMC,
a.YBHDJE,a.GRZFJE,a.TCJJJE,a.YYZFJE,a.BZ0000,
a.SFLSTD,a.ZFBL01,a.ZFBL02,a.ZFBL03,a.YJJE00,C.ZYID00,C.ZDMC00,A.BAE465 ,A.BAEMC0
  from BM_DBZDEB A, BM_DBZZDB B, BQ_BRZDXX C
 where B.BQBMID= A.BQBMID and C.ZDFS00='1' and A.YXBZ00='1'
   and ((WHLB00 = '0' and B.ZDBM00 = trim(C.ZDM000)) or
       (WHLB00 = '1' and INSTR(C.ZDM000,B.ZDBM00)>0));
       
