title: Find next date value in the column
body: <p>I have a large table with the following columns and sample values:  </p>
  
  <pre><code>ID  Ser     Reg Date
  1   12345   001 1/3/2011
  1   12345   001 2/2/2011
  1   12345   002 1/3/2011
  1   12345   002 2/2/2011
  2   23456   001 1/3/2011
  2   23456   001 2/7/2011
  2   23456   001 3/5/2011
  </code></pre>
  
  <p>I tried this query from a previous post SQL - Select next date query - but did not get the desired results:</p>
  
  <pre><code>SELECT 
      mytable.id, 
      mytable.date, 
      ( 
          SELECT 
              MIN(mytablemin.date) 
          FROM mytable AS mytablemin 
          WHERE mytablemin.date &gt; mytable.date 
      ) AS NextDate 
  FROM mytable 
  </code></pre>
  
  <p>This is what I am trying to accomplish:</p>
  
  <pre><code>ID     Ser         Reg     curr_Date   prev_Date
  1      12345       001     2/2/2011    1/3/2011
  1      12345       002     2/2/2011    1/3/2011
  2      23456       001     2/7/2011    1/5/2011
  2      23456       001     3/5/2011    2/7/2011
  </code></pre>
  
  <p>I would appreciate any help with this task. </p>