• 且行好事,莫问前程


    --日志抽取
    procedure extract_bte_logMain(pStTime varchar2, pEndTime varchar2) is
    pLogStr varchar2(4000) := ' select dataId,opertype,datatype,logtime from t_content_release_log@btepublish_';
    cLog C;
    bteLogInfo BTELOG ;
    newInfo t_info_upd_log%rowtype;
    iCount number(10) := 0 ;
    begin
    --对本地网循环
    --for t in (select distinct city_no from icrm_t_area where city_no <> 0 )
    --测试阶段 暂用020
    del_t_info_upd_log(to_date(pStTime,'yyyy-mm-dd hh24:mi:ss'),to_date(pEndTime,'yyyy-mm-dd hh24:mi:ss'));
    commit;
    for t in (select distinct city_no from icrm_t_area where city_no = '020' ) loop
    pLogStr := pLogStr || t.city_no || ' where logtime >= to_date('''||pStTime||''', ''yyyy-mm-dd hh24:mi:ss'') and
    logtime <= to_date('
    ''||pEndTime||''',''yyyy-mm-dd hh24:mi:ss'')';
    open cLog for pLogStr ;
    loop
    fetch cLog into bteLogInfo ;
    exit when cLog%notfound;
    newInfo.Info_Type := bteLogInfo.datatype;
    newInfo.Info_Id := bteLogInfo.dataId;
    newInfo.Create_Time := bteLogInfo.logtime;
    if upper(bteLogInfo.operatype) in ('P','A','B','U') then
    newInfo.Operate_Type := 'U';
    else
    newInfo.Operate_Type := upper(bteLogInfo.operatype);
    end if;
    ins_t_info_upd_log(newInfo);
    iCount := iCount + 1;
    if mod(iCount,1000) = 0 then
    commit;
    end if;
    end loop;
    close cLog;
    commit;
    end loop;
    exception when others then
    rollback;
    end;

  • 相关阅读:
    批量转外部样式为行内样式
    AngularJS 笔记2
    windows特殊文件或文件夹
    zepto 入门
    js闭包
    AngularJS 笔记1
    sublime配置 sublimecondeintel 分号后不要提示
    sublime插件开发手记
    用flvplayer.swf在网页中播放视频(网页中flash视频播放的实现)
    无插件启动谷歌浏览器
  • 原文地址:https://www.cnblogs.com/treemanfm/p/2366995.html
Copyright © 2020-2023  润新知