oracle - Query returning -> ORA-19011: Character string buffer too small -
i'm running query below, , oracle returning following message: query returning -> ora-19011: character string buffer small when uncomment last line, works. think thats why return few results. how solve this?
select substr(xmlagg(xmlelement (e, str||',')).extract ('//text()'),1,(length(trim(xmlagg (xmlelement (e, str||',')).extract ('//text()')))-2)) motivos ( select to_char(lo_valor) str 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 pec.cd_editor_registro = er.cd_registro , pdc.cd_documento_clinico = pec.cd_documento_clinico , ed.cd_documento = ev.cd_documento , el.cd_versao_documento = ev.cd_versao_documento , el.cd_layout = elc.cd_layout , elc.cd_campo = ec.cd_campo , elc.cd_campo = erc.cd_campo , er.cd_registro = erc.cd_registro , er.cd_layout = el.cd_layout , ec.ds_identificador = 'nut_orientacoes_entregues_1' , to_char(lo_valor) not null --and trunc(pdc.dh_documento) between trunc(sysdate-5) , trunc(sysdate) )
the contents of xmlagg(xmlelement ...)
call returns clob
, , trying stuff varchar2
since call substr
example. fail if clob
large.
the reason fail when uncomment last line outside range, there rows having contents long.
Comments
Post a Comment