条条道路通罗马:不行你就用dbsm_sql包吧.

解决方案 »

  1.   

    ERROR 位于第 2 行:
    ORA-06550: line 2, column 41:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    not null index
    ORA-06550: line 3, column 43:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    not null index
    ORA-06550: line 4, column 29:
    PLS-00103: Encountered the symbol ")" when expecting one of the following:
    ( - + mod not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable>
    <a number> etc.
    The symbol "+" was substituted for ")"
    ORA-06550: line 5, column 35:
    PLS-00103: Encountered the symbol ")" when expecting one of the following:
    ( - + mod not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable>
    <a number> etc.
    The symbol "+" was substituted for ")"
    ORA-06550: line 11, column 13:
    PLS-00103: Encountered the symbol "IMMEDIATE" when expecting one of the
    following:
    := . ( @ % ;
    哇,那么多错。
      

  2.   

    在815的文档中找到一个例子.
    Bulk Fetching
    The following example shows that you can bulk-fetch from a cursor into one or more collections: DECLARE
       TYPE NameTab IS TABLE OF emp.ename%TYPE;
       TYPE SalTab IS TABLE OF emp.sal%TYPE;
       names NameTab;
       sals  SalTab;
       CURSOR c1 IS SELECT ename, sal FROM emp WHERE sal > 1000;
    BEGIN
       OPEN c1;
       FETCH c1 BULK COLLECT INTO names, sals;
       ...
    END;