create or replace procedure data_move(param in number) is cursor enterprise is select SENTERPRISEID, SSPECIALNUMBER, NSPECIALNUMBERTYPE FROM e_uc_specialcode; enter char(10); spnumber VARCHAR2(32); sptype number; id number; begin open enterprise; id:=1; loop fetch enterprise into enter, spnumber, sptype; exit when enterprise %NOTFOUND; insert into e_uc_callprefixanalysis (nid, SENTERPRISEID, SCALLPREFIX, NEXTENDCALLTYPE, SSERVICECATOLOG, SCALLATTRIBUE, NMINLEN, NMAXLEN, SLONGNUMBER, SCALLERCHANGE, SCALLEECHANGE,SSOURCEID) values (id, enter, spnumber, sptype, '0', '0', 1, 32, '0', '0', '0', '0'); id:=id+1; commit; end loop; close enterprise; end data_move; / begin data_move('1'); end; /