title: Concat cells of multiple rows into one row
body: <p>I have a really weird requirement for my SQL Server table and I'm not sure if it is impossible to solve. </p>
  
  <p>I have a client-side grid/table which displays data by a given T-SQL query/stored procedure. The table in the SQL Server database that I am looking at is numeric data with timestamps - something like this:</p>
  
  <pre><code>| DateTime(Key)          | Value  |
  +------------------------+--------+
  | 2010-07-27 17:00:00.00 | 1.337  |
  | 2010-07-27 18:00:00.00 | 2.453  |
  | 2010-07-27 19:00:00.00 | 3.2342 |
  </code></pre>
  
  <p>The requirement now is to display more 'value'-columns in one row like so:</p>
  
  <pre><code>| DateTime(Key)          | Value  | Value  | Value  |
  +------------------------+--------+--------+--------+
  | 2010-07-27 17:00:00.00 | 1.337  | 2.453  | 3.2342 |
  | 2010-07-27 20:00:00.00 | 4.432  | 5.3422 | 6.9484 |
  </code></pre>
  
  <p>(<strong>Attention:</strong> The successive first numbers are just for readability)</p>
  
  <p>Now I would like to create a view/stored procedure which allows me to provide the column I would like to have multiple of and the amount.</p>
  
  <p>I have no idea how to approach this. Because you have to look at the next x rows and remove them and apply them to the first one. </p>