-- Created on 2006-1-9 by ADMINISTRATOR
declare
-- Local variables here
v_unitnum varchar2(14);
v_unitname varchar2(64);
v_Parentnum varchar2(14);
CURSOR c_routenum is
select t.routenum, t.routename, t.beloteamnum
from g_routenum t;
begin
-- Test statements here
open c_routenum;
fetch c_routenum
into v_unitnum, v_unitname, v_Parentnum;
while c_routenum%found loop
insert into g_unitnum
(unitnum,
unitname,
respemplnum,
symbol,
mainttypenum,
querytype,
parentnum)
values
(v_unitnum, v_unitname, '', '6', '', '', v_Parentnum);
/*dbms_output.put_line(v_unitname);*/
fetch c_routenum
into v_unitnum, v_unitname, v_Parentnum;
end loop;
close c_routenum;
commit;
end;