DECLARE nNumber int;
BEGIN
nNumber :=1;
LOOP
EXIT WHEN nNumber = 5;
INSERT INTO t_pick_detail (order_number,line_number,type,uom,work_q_id,work_type,status,item_number,planned_quantity,picked_quantity
,staged_quantity,pick_location,picking_flow,load_id,pick_area,wh_id,create_date)
SELECT order_number,line_number,type,uom,work_q_id,work_type,status,item_number,planned_quantity,picked_quantity
,staged_quantity,pick_location,picking_flow,load_id,pick_area,'Whouse' || TO_CHAR(nNumber),SYSDATE
FROM t_pick_detail;
Commit;
nNumber := nNumber + 1;
END LOOP;
end;
循环表记录,改变某列再插入表
猜你喜欢
转载自hkendless.iteye.com/blog/2047714
今日推荐
周排行