title: How to loop through table and update values in pl/sql
body: <p>We have Oracle 12 database.</p>
  
  <p>I need to loop through table and update the values based on previous row. Like below I need to get the value from row 1 and update it to rows 2 to 6. Then get the new value from row 7 and continue to the end of the table. The column1 is csv-formatted text so I'll need to extract the number-value from there...</p>
  
  <pre><code>id  column1 column2
  1   xxx;yyy;zzz;123456; 
  2   aaa 
  3   bbb 
  4   ccc 
  5   ddd 
  6   eee 
  7   xxx;yyy;zzz;789123; 
  8   aaa
  </code></pre>
  
  <p>After the update table should look like this:</p>
  
  <pre><code>id  column1 column2
  1   xxx;yyy;zzz;123456; 
  2   aaa 123456
  3   bbb 123456
  4   ccc 123456
  5   ddd 123456
  6   eee 123456
  7   xxx;yyy;zzz;789123; 
  8   aaa 789123
  </code></pre>
  
  <p>Tbh I don't have much experience with pl/sql.
  I tried to use pl/sql while loop but It didn't work.</p>
  
  <p>If someone could kick me in right direction that would be appreciated.</p>