PLSQL oracle中的CLOB值返回:指定的LOB定位器无效:ORA-22275

时间:2018-08-22 07:04:03

标签: plsql

从存储过程返回CLOB时,出现以下错误:

ORA-06502:PL / SQL:数字或值错误:指定的LOB定位器无效:ORA-22275

获得Clob输出的解决方案是什么? (另外,我正在使用Toad)

Plsql代码:

PROCEDURE resp               (p_code   IN     VARCHAR2,
                              p_xml_out   IN OUT CLOB,
                              p_rec        IN OUT int_cms_details%ROWTYPE)
   IS
      l_xml   CLOB := '  ';
   BEGIN
     SELECT XMLELEMENT (
          "rootelement",
          XMLELEMENT ("status",
                      DECODE (column, 'SUCCESS', 'SUCCESS', 'FAIL')),
          XMLELEMENT (
             "Questions",
             XMLAGG (
                XMLELEMENT (
                   "Question",
                   (XMLFOREST (col1 as "Code",
                               col2 as "Description")))))).getclobval ()
                               into l_xml
   FROM table;
        p_xml_out := l_xml;                             

END res;

0 个答案:

没有答案