ITPub博客

首页 > 数据库 > Oracle > 过程2

过程2

原创 Oracle 作者:simkyo 时间:2013-11-28 09:24:32 0 删除 编辑
-- 记录日志
  sp_ws_exec_log(v_task_name,v_table_name,v_task_pos,v_sqlerr,v_sqlmsg,v_curr_time,0);

  -- 检查入参是否为空
  v_task_pos := '检查输入参数';
    if (i_date='' or i_date  is null) then
        v_sqlerr := -20001;
        v_sqlmsg  := '没有输入统计日期参数';
        raise input_error;
    end if;

      -- 清空临时表
      v_sql := 'truncate table t_tmp_array_over';
      execute immediate v_sql;

      -- 获取正在执行中的活动,得到最大排期日期
      insert into t_tmp_array_over(ACTIVITY_CODE,EXEC_STATUS,END_TIME,ARRAY_TIME)
       select t.activity_code,
              t.exec_status,
              t.end_time,
              replace(substr(a.array_time, instr(a.array_time, ',', -1, 2)),',',null)
         from t_run_activity_plan_info t, t_run_activity_time a
        where t.exec_status = '5'                     -- 只判断执行中的活动
          and t.activity_code = a.activity_code;
     commit;

      

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12961536/viewspace-1061346/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 过程1
下一篇: 过程3
请登录后发表评论 登录
全部评论

注册时间:2013-06-20

  • 博文量
    193
  • 访问量
    165519