title: Redshift split single dynamic column into multiple rows in new table
body: <p>With a table like:</p>
  
  <pre><code>       uid               |            segmentids
  -------------------------+----------------------------------------
   f9b6d54b-c646-4bbb-b0ec | 4454918|4455158|4455638|4455878|4455998
   asd7a0s9-c646-asd7-b0ec | 1265899|1265923|1265935|1266826|1266596
   gd3355ff-cjr8-assa-fke0 | 2237557|2237581|2237593
   laksnfo3-kgi5-fke0-b0ec | 4454918|4455158|4455638|4455878
  </code></pre>
  
  <p>How to create a new table with:</p>
  
  <pre><code>      uid               |         segmentids
  -------------------------+---------------------------
   f9b6d54b-c646-4bbb-b0ec |           4454918
   f9b6d54b-c646-4bbb-b0ec |           1265899
   f9b6d54b-c646-4bbb-b0ec |           2237557
   f9b6d54b-c646-4bbb-b0ec |           4454918
   f9b6d54b-c646-4bbb-b0ec |           4454918
   asd7a0s9-c646-asd7-b0ec |           1265899
   asd7a0s9-c646-asd7-b0ec |           1265923
   asd7a0s9-c646-asd7-b0ec |           1265935 
   asd7a0s9-c646-asd7-b0ec |           1266826
   asd7a0s9-c646-asd7-b0ec |           1266596
  </code></pre>
  
  <p>The number of segments are dynamic, can vary with each record.
  I tried the Split function with delimiter, but it requires the index in string, which is dynamic here.</p>
  
  <p>Any suggestions?</p>