码迷,mamicode.com
首页 > 数据库 > 详细

oracle forall

时间:2016-09-07 17:32:49      阅读:367      评论:0      收藏:0      [点我收藏+]

标签:

select * bulk collect
    into r_115
    from TZTJ_CL0115
   where nf = v_nf
     and yf = v_yf
     and dwbm = ‘1‘
     and lb = ‘项目‘;
  for i in 1 .. r_115.count loop
    select *
      into r_tzkt
      from tztj_tz_kt
     where nf = v_nf
       and yf = v_yf
       and xmid = r_115(i).xmid;
 
    r_115(i).col53 := r_tzkt.zygzl_ew;
    r_115(i).col54 := r_tzkt.zygzl_sw;
    r_115(i).col55 := r_tzkt.zygzl_ytjks;
    r_115(i).col56 := r_tzkt.zygzl_ytjjc;
    --r_115(i).col57 := r_tzkt.erp_hj;
    --r_115(i).col58 := r_tzkt.erp_wht_xj;
    --r_115(i).col58 := r_tzkt.erp_wht_xj;
    r_115(i).col60 := r_tzkt.erp_hj;
    r_115(i).col61 := r_tzkt.erp_wht_xj;
    r_115(i).col62 := r_tzkt.erp_zj_ytj;
    r_115(i).col70 := r_tzkt.tzwc_hj;
    r_115(i).col71 := r_tzkt.tzwc_wht_xj;
    r_115(i).col72 := r_tzkt.tzwc_zj_ytj;
  end loop;
  delete from tztj_cl0115
   where nf = v_nf
     and yf = v_yf
     and lb = ‘项目‘;
  forall i in 1 .. r_115.count
    INSERT INTO tztj_cl0115 VALUES r_115 (i);
  commit;

oracle forall

标签:

原文地址:http://www.cnblogs.com/sddychj/p/5850112.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!