首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >返回-> ORA-19011的查询:字符串缓冲区太小

返回-> ORA-19011的查询:字符串缓冲区太小
EN

Stack Overflow用户
提问于 2014-12-16 13:42:23
回答 1查看 2.9K关注 0票数 0

我在下面运行这个查询,并返回以下消息:查询返回-> ORA-19011:字符串缓冲区太小当我取消对最后一行的注释时,它可以工作。我认为这就是为什么这只会带来很少的结果。如何解决这个问题?

代码语言:javascript
复制
 select substr(xmlagg(xmlelement (e, str||',')).extract ('//text()'),1,(Length(Trim(xmlagg (xmlelement (e, str||',')).extract ('//text()')))-2)) motivos
     FROM (
           select to_char(lo_valor) str
             from editor_layout el,
                  editor_versao_documento ev,
                  editor_documento ed,
                  editor_layout_campo elc,
                  editor_campo ec,
                  editor_registro er,
                  editor_registro_campo erc,
                  pw_editor_clinico pec,
                  pw_documento_clinico pdc
            where pec.cd_editor_registro   = er.cd_registro
              and pdc.cd_documento_clinico = pec.cd_documento_clinico
              and ed.cd_documento          = ev.cd_documento
              and el.cd_versao_documento   = ev.cd_versao_documento
              and el.cd_layout             = elc.cd_layout
              and elc.cd_campo             = ec.cd_campo
              and elc.cd_campo             = erc.cd_campo
              and er.cd_registro           = erc.cd_registro
              and er.cd_layout             = el.cd_layout
              and ec.ds_identificador = 'nut_orientacoes_entregues_1'
              AND To_Char(lo_valor) IS NOT null
              --and Trunc(pdc.dh_documento) BETWEEN Trunc(SYSDATE-5) AND Trunc(SYSDATE)
          )
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-12-16 13:49:16

xmlagg(xmlelement ...)调用的内容返回一个clob,并且您正在尝试将其填充到varchar2中,因为您调用了substr。如果clob太大,这将失败。

当您取消注释最后一行时,它将失败的原因是,在该范围之外,有一些内容太长的行。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27506028

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档