title: sql update query on temporary table
body: <p>I have a temporary table like below :</p>
  
  <pre><code>  Date    Fund  NotAdded    Dividend
  1/1/2017    A     0           0
  1/2/2017    A     0           0
  1/3/2017    A   100           0
  1/4/2017    A     0         200
  1/5/2017    A    50          50
  1/1/2017    B     0           0
  1/2/2017    B   100           0
  1/3/2017    B     0         200
  1/4/2017    B     0           0
  </code></pre>
  
  <p>I want to run a update query on above table in a way that I will get result like below:</p>
  
  <pre><code>Date      Fund  NotAdded    Dividend   Notional
  1/1/2017    A     0           0         5000 (this value is known)
  1/2/2017    A     0           0         5000
  1/3/2017    A   100           0         5100
  1/4/2017    A     0         200         5300
  1/5/2017    A    50          50         5400
  1/1/2017    B     0           0         2000
  1/2/2017    B   100           0         2100  
  1/3/2017    B     0         200         2300
  1/4/2017    B     0           0         2300
  </code></pre>
  
  <p>For each fund, default Notional value is known. i.e. in above example 5000 for fund A and 2000 for fund B.</p>
  
  <p>I tried but not able to get the desired output. Any help!!!</p>