
delete from ur_task_dw_rpt where rpt_id = '013C126F1D4642FE9BBDA0A2E03EB1D6'
and dw_id = (select dw from UR_DA_ZCFZB_XZ_01 t 
where t.dw=ur_task_dw_rpt.dw_id and t.qj = ur_task_dw_rpt.perd_code and t.zcfzb_xzd22_938 = 0)
and perd_code = (select qj from UR_DA_ZCFZB_XZ_01 t 
where t.dw=ur_task_dw_rpt.dw_id and t.qj = ur_task_dw_rpt.perd_code and t.zcfzb_xzd22_938 = 0);

delete from ur_task_dw_rpt where rpt_id = '39867EDFD0CF49E4B783C586EF6BF72F'
and dw_id = (select dw from UR_DA_ZCFZB_SY_01 t 
where t.dw=ur_task_dw_rpt.dw_id and t.qj = ur_task_dw_rpt.perd_code and t.ZCFZB_SYD35_599 = 0)
and perd_code = (select qj from UR_DA_ZCFZB_SY_01 t 
where t.dw=ur_task_dw_rpt.dw_id and t.qj = ur_task_dw_rpt.perd_code and t.ZCFZB_SYD35_599 = 0);

delete from ur_task_dw_rpt where rpt_id = 'C4A18F1159DE4AC9A8F13D18E53C6EAD'
and dw_id = (select dw from UR_DA_ZCFZB_GS_01 t 
where t.dw=ur_task_dw_rpt.dw_id and t.qj = ur_task_dw_rpt.perd_code and t.zcfzb_gsb37_155 = 0)
and perd_code = (select qj from UR_DA_ZCFZB_GS_01 t 
where t.dw=ur_task_dw_rpt.dw_id and t.qj = ur_task_dw_rpt.perd_code and t.zcfzb_gsb37_155 = 0);

delete from ur_task_dw where task_id = 'C576BF58AAC144E2B905A961F006681F'
and dw_id = (select dw from UR_DA_ZCFZB_XZ_01 t 
where t.dw=ur_task_dw.dw_id and t.qj = ur_task_dw.perd_code and t.zcfzb_xzd22_938 = 0)
and perd_code = (select qj from UR_DA_ZCFZB_XZ_01 t 
where t.dw=ur_task_dw.dw_id and t.qj = ur_task_dw.perd_code and t.zcfzb_xzd22_938 = 0);

delete from ur_task_dw where task_id = 'C576BF58AAC144E2B905A961F006681F'
and dw_id = (select dw from UR_DA_ZCFZB_SY_01 t 
where t.dw=ur_task_dw.dw_id and t.qj = ur_task_dw.perd_code and t.ZCFZB_SYD35_599 = 0)
and perd_code = (select qj from UR_DA_ZCFZB_SY_01 t 
where t.dw=ur_task_dw.dw_id and t.qj = ur_task_dw.perd_code and t.ZCFZB_SYD35_599 = 0);

delete from ur_task_dw where task_id = 'C576BF58AAC144E2B905A961F006681F'
and dw_id = (select dw from UR_DA_ZCFZB_GS_01 t 
where t.dw=ur_task_dw.dw_id and t.qj = ur_task_dw.perd_code and t.zcfzb_gsb37_155 = 0)
and perd_code = (select qj from UR_DA_ZCFZB_GS_01 t 
where t.dw=ur_task_dw.dw_id and t.qj = ur_task_dw.perd_code and t.zcfzb_gsb37_155 = 0);

delete from UR_DA_ZCFZB_XZ_01  where (zcfzb_xzd22_938 = 0);
delete from UR_DA_ZCFZB_SY_01  where (ZCFZB_SYD35_599 = 0);
delete from UR_DA_ZCFZB_GS_01  where (zcfzb_gsb37_155 = 0);
