Iam using this part of an SQL Satement to fetch Information from an N:N Relationship.
The Goal is to have an view with an column like: "STRING1,STRING2,STRING3". This works fine but i have sometimes more than 4000 Bytes in the Column.
(SELECT
(RTRIM(XMLAGG(xmlelement(X, TABLE1.STRING||',') order by TABLE1.STRING).extract('//text()'),','))
FROM
STRING_HAS_TABLE1
JOIN TABLE1 STRING_HAS_TABLE1.STRING_ID = TABLE1.ID
WHERE
STRING_HAS_TABLE1.USER_ID = X.ID) AS STRINGS,
Oracle throws "Buffer overflow". I think the problem is the columntype inside the view: VARCHAR2(4000).
ERROR: ORA 19011 - Character string buffer to small
Any ideas to handle this without changing the whole application logic?