首页 > 数据库技术 > 详细

oracle forall

时间:2016-09-07 17:29:53      阅读:304      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!