title: Add end date to record that is the start date of the next record
body: <p>I have a table that contains a record of prioritys that links to another table.</p>
  
  <p><code>FK - Priority - PriorityUpdateDateTime</code></p>
  
  <p>What I'm trying to do is add an end date to this table, but only as a temp table.</p>
  
  <p>So what I need is <code>FK - Priority - StartDate - EndDate</code></p>
  
  <p>Where EndDate is the next PriorityUpdateDateTime </p>
  
  <p>i.e.</p>
  
  <p><code>FK - Priority - PriorityUpdateDateTime</code></p>
  
  <p><code>123 - 4 - 2011-02-25</code></p>
  
  <p><code>123 - 2 - 2011-02-30</code></p>
  
  <p><code>123 - 3 - 2011-03-10</code> </p>
  
  <p>Becomes</p>
  
  <p><code>FK - Priority - StartDate - EndDate</code></p>
  
  <p><code>123 - 4 - 2011-02-25 - 2011-02-30</code></p>
  
  <p><code>123 - 2 - 2011-02-30 - 2011-03-10</code></p>
  
  <p><code>123 - 3 - 2011-03-10 - NULL</code> </p>
  
  <p>Thanks for your help</p>