title: PL/SQL for implode function on custom types
body: <p>Is there any way to create an implode routine in PL/SQL that takes any custom datatype as a parameter and concatenates its members, delimited by some specified string?</p>
  
  <p>For example, say I've got the following type:</p>
  
  <pre><code>CREATE TYPE myPerson AS OBJECT(
    forename VARCHAR2(50),
    surname  VARCHAR2(50),
    age      NUMBER
  );
  </code></pre>
  
  <p>Then, say a function returns an object of type <code>myPerson</code>, but I want the columns concatenated together:</p>
  
  <pre><code>SELECT implode(getPerson(1234),'$$') from dual;
  </code></pre>
  
  <p>to return (supposing the data in this contrived example is set up):</p>
  
  <pre><code>John$$Doe$$55
  </code></pre>
  
  <p>Where the delimiter can be specified as an optional parameter, but the type of the first parameter could be anything (not necessarily <code>myPerson</code>).</p>