title: Replace certain records in a column with given condition in kdb
body: <p>I have a table below:</p>
  
  <pre><code>tab:([]a:(`$"1-01";`2;`$"3-01";`4;`$"5-01";`6);source:`a`a`b`b`a`b)
  
  a    source
  -----------
  1-01 a     
  2    a     
  3-01 b     
  4    b     
  5-01 a     
  6    b  
  </code></pre>
  
  <p>I would like to change the 1-01 and 5-01 back to 1 but not for 3-01 depending on the source. I wrote the code below:</p>
  
  <pre><code>`$({ssr[string x;"-01";""]}each tab[`a])
  </code></pre>
  
  <p>by doing this I can put this back to a column, but this is not what I want. I also did the following:</p>
  
  <pre><code>`$({ssr[string x;"-01";""]}each tab[`a] where source=`a)
  </code></pre>
  
  <p>but after doing this I do not know how to put it back to the table. Then I thought of using execution control: but not sure how i should code it. I have it half way done and it does not really work:</p>
  
  <pre><code>?[tab[`source] = `a;`$({ssr[string tab[`a];"-01";""]});tab[`a]]
  </code></pre>