Oracle数据库通过DBLINK实现远程访问(2)

insert into t_coll_result (id, CREATE_DATE, REMARK)
  values (seq_t_coll_result_id.nextval, sysdate, 'START-现在开始执行【SP_SYNC_CUSTOMER_TEMP】向客户同步临时表导入数据TEMP_SYNC_CUSTOMER...');
  commit;

INDEX_COUNT := 1;
  INDEX_TOTAL := 0;
  FOR C IN CR LOOP
    --客户临时表
    INSERT INTO TEMP_SYNC_CUSTOMER
      (CODE,
      ORGA_ID,
      ID_CARD,
      NAME,
      CLOSE_STATUS,
      ACCOUNT_CREATE_DATE,
      CAPITAL_ACCOUNT,
      BIRTHDAY,
      ADDRESS,
      TEL,
      BINDING_EMAIL,
      BINDING_MOBILE,
      MAIN_FLAG
      )
    VALUES
      (C.client_id,
      C.branch_no,
      C.id_no,
      C.client_name,
      C.client_status,
      C.open_date,
      C.fund_account,
      C.birthday,
      C.address,
      C.home_tel,
      C.e_mail,
      C.mobile_tel,
      C.main_flag);
     
    INDEX_COUNT := (INDEX_COUNT + 1);
    INDEX_TOTAL := (INDEX_TOTAL + 1);
   
    IF INDEX_COUNT > 100000 THEN
      COMMIT;
      insert into t_coll_result (id, CREATE_DATE, REMARK)
      values (seq_t_coll_result_id.nextval, sysdate, '【SP_SYNC_CUSTOMER_TEMP】已向TEMP_SYNC_CUSTOMER导入' || INDEX_TOTAL || '条数据...');
      commit;
      INDEX_COUNT := 1;
    END IF;
  END LOOP;

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/1b5d5c34813652aef162588a10b45319.html