title: Update multiple records SQL with condition (FIFO)
body: <p>I am sorry before if that title doesn't represent my problem here.</p>
  
  <p>The scenario:</p>
  
  <blockquote>
    <p>I do outbound 5 items for ItemA</p>
  </blockquote>
  
  <p>Table FIFO:</p>
  
  <pre><code>| date       | item  | inbound | outbound |
  | 13/11/2015 | itemA |    2    |          |
  | 15/11/2015 | itemA |    8    |          |
  </code></pre>
  
  <p>My UPDATE script's now (wrong):</p>
  
  <pre><code> | date       | item  | inbound | outbound |
   | 13/11/2015 | itemA |    2    |     5    |
   | 15/11/2015 | itemA |    8    |          |
  </code></pre>
  
  <p>The expected result (right):</p>
  
  <pre><code>| date       | item  | inbound | outbound |
  | 13/11/2015 | itemA |    2    |     2    |
  | 15/11/2015 | itemA |    8    |     3    |
  </code></pre>
  
  <p>I have using SQL Server 2008. My script only UPDATE the first row. How to achieve this with SQL?
  I am create the scenario on fiddle <a href="http://sqlfiddle.com/#!3/f5a5e/13" rel="nofollow">here</a>. I don't know some script give an error there but in SQL Server is work.</p>
  
  <p>Thank in advance</p>