显式游标传递表作为参数PLS-00382

时间:2018-07-02 09:58:05

标签: oracle11g user-defined-types

我有一个带有UDT类型表的函数,如参数所示。该函数的目的是将JSON Clob返回到调用环境。不幸的是,程序包主体编译时出现错误:

  

PACKAGE BODY JOHN.packageA的编译错误#13#10错误:   PLS-00382:表达式的类型错误行:8文本:来自人员   v_ids的id成员;

是否无法将运算符的成员与关联数组一起使用?我应该采取什么不同的方法?

CREATE OR REPLACE Package packageA As

   TYPE ids_tbl is Table of Number(10) INDEX BY PLS_INTEGER;   

   function get_people_json (p_custIds in ids_tbl) return clob;

End;

CREATE OR REPLACE Package Body PackageA As

  function get_people_json (p_custIds in ids_tbl) 
    return clob

    is

    cursor people_cur(v_ids ids_tbl) select * from persons where id member of v_ids;

    TYPE people_aat IS TABLE OF people_cur%ROWTYPE
    INDEX BY PLS_INTEGER;



    ....

    Begin

      open people_cur(p_custIds);
      ....



      return l_clob;

    End;
 End;

问候 马格努斯

0 个答案:

没有答案