select run_id,run_begin_time,run_next_time,
run_interval,run_desc,sts,sts_date,staff_id,exec_sql,sysdate,sysdate-run_next_time cha
from yx_run_time_manager
where sts='A' and (sysdate-run_time)*24*60<30

解决方案 »

  1.   

    select run_id,run_begin_time,run_next_time,
    run_interval,run_desc,sts,sts_date,staff_id,exec_sql,sysdate,sysdate-run_next_time cha
    from yx_run_time_manager
    where sts='A' and (sysdate-run_next_time)*24*60<30
      

  2.   

    :)
    错了,相减后cha应该是数值型
     chr<30/24*60;
      

  3.   

    and (sysdate-run_next_time)<3/144
      

  4.   

    and (sysdate-run_next_time)*24*60<30
    不行啊,查不出来值啊。
      

  5.   

    你运行它:
    select run_id,run_begin_time,run_next_time,
    run_interval,run_desc,sts,sts_date,staff_id,exec_sql,sysdate,(sysdate-run_next_time)*24*60 cha
    from yx_run_time_manager
    where sts='A'
    看看查出来的纪录cha有没有满足<30的条件的。