title: Teradata Concatenate multiple rows using XMLAGG getting issue in XmlAgg function or any equivalent logic to concatendate multiple rows
body: <p>I have a table of record tried to concatenate multiple rows on group wise and i use XMLAGG function but when i try to run the query for particular group which has 2000 records, getting error message:</p>
  <blockquote>
  <p>Select failed 9134 : Intermediate aggregate storage limit for aggregation has been exceeded during computation</p>
  </blockquote>
  <pre class="lang-sql prettyprint-override"><code>SELECT 
    H.GROUP_id,
    H.Group_name,
    TRIM(
      TRAILING ',' FROM (
        XMLAGG(TRIM(COALESCE(H.Group_desc, -1) || '') ORDER BY H.LINE_NBR) (VARCHAR(7000))
      )
    ) AS Group_detail
  </code></pre>
  <p>even increased the varchar value but still having same issue</p>