DECLARE
CURSOR CUR103 IS
SELECT A.PATENT_CTGRY FROM G103T A WHERE A.SKJ_FLG = '0';
TYPE ARRAY IS TABLE OF G103T.PATENT_CTGRY%TYPE;
patent_list ARRAY;
BEGIN
OPEN CUR103;
LOOP
FETCH CUR103 BULK COLLECT
INTO patent_list LIMIT 300;
IF patent_list.COUNT > 0 THEN
----------------------------------------------------
FOR I IN patent_list.FIRST .. patent_list.COUNT
LOOP
insert into G302t
select
*
from A
where A.PATENT_CTGRY =patent_list(i);
COMMIT;
END LOOP;
----------------------------------------------------
ELSE
EXIT;
END IF;
END LOOP;
IF CUR103%ISOPEN
THEN
CLOSE CUR103;
END IF;
END;
阅读(721) | 评论(0) | 转发(0) |