select t.task_id as counts
  from tnm_task_info t
 where (t.is_valid = 2 and
       to_date(t.start_time, 'yyyy-mm-dd hh24:mi:ss') <= sysdate and
       t.start_time is not null)
   and (to_date(t.end_time, 'yyyy-mm-dd hh24:mi:ss') >= sysdate and
       t.end_time is not null)
   and (to_date(t.send_param, 'hh24:mi') <= sysdate and
       t.last_update_dt < trunc(sysdate))
   and ((t.send_type = 'D' or
       (t.send_type = 'M' and t.send_time = to_char(sysdate, 'DD')) or
       (t.send_type = 'W' and
       t.send_time = to_char(to_number(to_char(sysdate, 'D')) - 1))))
 order by t.insert_dt

相关文章:

  • 2022-12-23
  • 2021-05-16
  • 2022-12-23
  • 2021-08-28
  • 2021-09-28
  • 2022-12-23
  • 2022-01-04
猜你喜欢
  • 2022-02-02
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
  • 2021-12-09
相关资源
相似解决方案