Orcale 储存过程循环插入
来源:互联网 发布:软件项目总监岗位职责 编辑:程序博客网 时间:2024/05/19 19:31
create or replace procedure proc_xop_test(v_supplier_id in number, v_updatesupplier_id in number) as V_ERRCODE NUMBER(20); V_ERRMSG VARCHAR2(200); V_SQL VARCHAR2(4000); v_temp_tbale xiu_mop.X_MOP_GOODS%rowtype; v_aq_seq NUMBER; v_img_seq NUMBER; cursor c_myucursor is select * from xiu_mop.X_MOP_GOODS t where t.supplier_id = v_supplier_id and t.del_flag != 1;begin open c_myucursor; loop begin fetch c_myucursor into v_temp_tbale.GOODS_ID, v_aq_seq := X_XOP_GOODS_SEQ.nextval; v_img_seq:= X_XOP_GOODS_IMG_SEQ.nextval; exit when c_myucursor%notfound; ----insert insert into x_xop_goods (GOODS_ID, XIU_CODE, SALECHANNEL, SUBMIT_STATUS) values ( v_aq_seq, v_temp_tbale. XIU_CODE, v_temp_tbale. GOODS_CODE, (case when v_temp_tbale.GOODS_STATUS = 0 then 0 else null end)); commit; EXCEPTION --事物回滚后继续执行 WHEN OTHERS THEN ROLLBACK; V_ERRCODE := SQLCODE; V_ERRMSG := SUBSTR(SQLERRM, 1, 200); INSERT INTO QUERY_ERR_LOG (OPDATE, FUNCNAME, ERRCODE, ERRMSG, ERRSQL) VALUES (SYSDATE, 'proc_xop', V_ERRCODE, V_ERRMSG, V_SQL); COMMIT; end; end loop; close c_myucursor;end proc_xop_test;
0 0
- Orcale 储存过程循环插入
- orcale 循环插入测试数据
- Orcale循环插入数据
- Oracle 利用储存过程插入循环插入大量数据方法
- orcale存储过程批量插入表数据
- orcale 循环
- mysql 存储过程 循环插入
- 一个MySQL储存过程(自动插入外键)
- 简简单单储存过程——循环一个select结果集
- 储存过程
- 储存过程
- 储存过程
- 储存过程
- orcale 批量生成 插入。
- Orcale循环的用法
- ORcale 存储过程实例
- Orcale 存储过程
- Orcale存储过程基础知识
- 站在你的风景里
- ios 通知NSNotification
- poj2299
- 站在你的风景里
- opencv卷积滤波cvFilter2D
- Orcale 储存过程循环插入
- 实现自己的printf函数(转载)
- 动态改变Quartz的调度时间(1)
- Ogre的相关工具和库 工具 Debuggers Debugging Tools for Windows http://www.microsoft.com/whdc/devtools/
- 《Linux Kernel Development》chapter 1 Introduction to Linux Kernel
- 在Contos下安装tomcat6.0.29
- maven+springMVC+mybatis+junit详细搭建过程
- 第四周作业
- IOS拨打完电话回到原程序的方法