title: Is it possible to group string within a string in Teradata?
body: <p>The original table (exactly the one that I am using .. with all commas brackets etc)</p>
  
  <pre><code>id     attributes
  1      123(red), 139(red), 123(white), 123(black), 139(white),
  2      123(black), 139(white), 123(green),
  32     223(blue), 223(red), 553(white), 123(black),
  4      323(white), 139(red), 
  23     523(red),
  </code></pre>
  
  <p>I need to group the attribute numbers so that my table looks like</p>
  
  <pre><code>id     attributes
  1      123(red, white, black); 139(red, white);
  2      123(black, green); 139(white);
  32     223(blue, red); 553(white); 123(black);
  4      323(white); 139(red);
  23     523(red);
  </code></pre>
  
  <p>How can I do this?</p>
  
  <p>Unfortunately i do not have access to stored procedures and functions like <code>oreplace .. translate</code>. I used to deal with Oracle previously and this is an easy task given one has access to stored procedures ... here i have no idea what to do</p>