title: XMLAGG - ORA-00932: inconsistent datatypes: expected - got CLOB on CLOB
body: <p>I have the following SQL query:</p>
  
  <pre><code>    SELECT DISTINCT
           prod_no,
           prod_text,
           RTRIM (
              XMLAGG (XMLELEMENT (e, prod_desc, ',').EXTRACT (
                         '//text()') ORDER BY prod_desc).getclobval (),
              ',')
      FROM mytable
     WHERE prod_no = 'XCY'
  GROUP BY prod_no,
           prod_text
  </code></pre>
  
  <p>When I execute I am getting </p>
  
  <blockquote>
    <p>ORA-00932: inconsistent datatypes: expected - got CLOB</p>
  </blockquote>
  
  <p><strong>Update 1</strong></p>
  
  <p>DDL and sample data</p>
  
  <pre><code>CREATE TABLE mytable
  (
     prod_no     VARCHAR2 (30 BYTE) NOT NULL,
     prod_text   VARCHAR2 (30 BYTE) NOT NULL,
     prod_desc   CLOB
  );
  
  SET DEFINE OFF;
  
  INSERT INTO mytable (prod_no, prod_text, prod_desc)
       VALUES ('XCY', 'DECKS', 'THIS IS TEST');
  
  INSERT INTO mytable (prod_no, prod_text, prod_desc)
       VALUES ('ABC', 'DECKS', 'THIS IS TEST 2');
  
  COMMIT;
  </code></pre>