sql - Oracle VIEW - More than 4000 bytes in Column -
iam using part of sql satement fetch information n:n relationship.
the goal have view column like: "string1,string2,string3". works fine have more 4000 bytes in column.
(select (rtrim(xmlagg(xmlelement(x, table1.string||',') order table1.string).extract('//text()'),',')) string_has_table1 join table1 string_has_table1.string_id = table1.id string_has_table1.user_id = x.id) strings, oracle throws "buffer overflow". think problem columntype inside view: varchar2(4000).
error: ora 19011 - character string buffer small
any ideas handle without changing whole application logic?
this problem converting implicitly between data types. can around treating clob before trimming, adding getclobval() call:
select rtrim(xmlagg(xmlelement(x, table1.string||',') order table1.string).extract('//text()').getclobval(),',') ... the rtrim documentation shows types accepts, , since xmltype isn't listed means has doing implicit conversion, apparently varchar2. (the same applies other trim functions).
but accept clob, doing explicit conversion clob means rtrim doesn't implicit conversion type that's small.
Comments
Post a Comment