修改一:
--AND trunc(ec.end_case_end_time) = trunc(SYSDATE - 1)
AND to_char(ec.end_case_end_time,'yyyyMMddhh24') = to_char(SYSDATE - 1/24,'yyyyMMddhh24')
修改二:
-- and lc.SIGNDATE = trunc(sysdate - 1)
and lc.SIGNDATE = trunc(sysdate)
and substr(lc.signtime,0,2)=to_char(sysdate-1/24,'hh24')
修改三:
and m.clmno not in (select ClaimNo from sd_claimj ) 或,此方式不好,采取下面的方式
and not exists (select 1 from sd_claimj j where j.ClaimNo = m.clmno)
exists和not exists。 期间测试用j.ClaimNo! = m.clmno,各种不等符号都不行,最后采用not exists