title: Character string buffer too small error in Oracle
body: <p>My table has the below data </p>
  
  <pre><code>Username Groupname
  -------- ---------------
  A        MAXADMIN
  A        BUYER
  B        PURCHASEMANAGER
  B        FINANCECLERK
  </code></pre>
  
  <p>Output should be like below </p>
  
  <pre><code>Username Groupname 
  -------- ----------------------------
  A        MAXADMIN,BUYER
  B        PURCHASEMANAGER,FINANCECLERK
  </code></pre>
  
  <p>I get an error <code>ORA-19011: character string buffer too small.</code>
  Thanks in advance </p>
  
  <pre><code>  select maxuser.userid,
           person.displayname,
           maxuser.status,
           sod_Report.severity,
           sod_Report.scenario,
           RTRIM (XMLAGG (XMLELEMENT (e, groupuser.groupname || ',')).EXTRACT ('//text()'),',') groupname
      from maxuser,
           person,
           groupuser,
           sod_report
     where    maxuser.userid=person.personid
          and groupuser.userid = maxuser.userid
          and sod_report.userid= maxuser.userid
  group by maxuser.userid,
           person.displayname,
           maxuser.status,
           sod_Report.severity,
           sod_Report.scenario
  </code></pre>