1.传入一个仓库名和订单号,读出来是多行
SELECT EXTERNORDERKEY,ORDERLINENUMBER,STORERKEY,SKU,SHIPPEDQTY,UOM,PACKKEY FROM 仓库名.ORDERDETAIL
WHERE ORDERKEY =订单号
2.根据
select keycount from 仓库名.ncounter where keyname ='RECEIPT'得到keycount值
3.根据第一条sql查询出来的值和第2条sql查询出来的值 keycount,EXTERNORDERKEY,ORDERLINENUMBER,STORERKEY,SKU,SHIPPEDQTY,UOM,PACKKEY
循环写入到
Insert into "+warehouse+".ReceiptDetail(keycount,EXTERNORDERKEY,ORDERLINENUMBER,STORERKEY,SKU,SHIPPEDQTY,UOM,PACKKEY )values()
带事务 谢谢了
oracle 存储 事务 sql
------解决方案--------------------
游标,自定义 Sql 插入,具体代码已发q