Chinaunix首页 | 论坛 | 博客
  • 博客访问: 970413
  • 博文数量: 358
  • 博客积分: 8185
  • 博客等级: 中将
  • 技术积分: 3751
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-15 16:27
个人简介

The views and opinions expressed all for my own,only for study and test, not reflect the views of Any Company and its affiliates.

文章分类

全部博文(358)

文章存档

2012年(8)

2011年(18)

2010年(50)

2009年(218)

2008年(64)

我的朋友

分类: Oracle

2009-02-04 17:39:59

 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) |
给主人留下些什么吧!~~