title: Merging Sql Rows based on same datetime
body: <p>I'm struggeling at the following task. I have a table like this:</p>
  
  <pre><code>+-----+-------------------------+-------------------------+-------------------------+-------------------+-------------------+-------------------+
  | Id  |      Assigned Date      |   Assigned Starttime    |    Assigned Endtime     | lesson_subject_id | lesson_teacher_id | lesson_classes_id |
  +-----+-------------------------+-------------------------+-------------------------+-------------------+-------------------+-------------------+
  | 116 | 2016-03-03 00:00:00.000 | 1900-01-01 13:15:00.000 | 1900-01-01 14:00:00.000 | SU_SK             | Adlberger         | CL_HEB 15/I B     |
  | 112 | 2016-03-03 00:00:00.000 | 1900-01-01 13:15:00.000 | 1900-01-01 14:00:00.000 | SU_SK             | Jakob             | CL_HEB 15/I A     |
  | 113 | 2016-03-03 00:00:00.000 | 1900-01-01 14:15:00.000 | 1900-01-01 15:00:00.000 | SU_SK             | Jakob             | CL_HEB 15/I A     |
  | 117 | 2016-03-03 00:00:00.000 | 1900-01-01 14:15:00.000 | 1900-01-01 15:00:00.000 | SU_SK             | Adlberger         | CL_HEB 15/I B     |
  | 118 | 2016-03-03 00:00:00.000 | 1900-01-01 15:15:00.000 | 1900-01-01 16:00:00.000 | SU_SK             | Adlberger         | CL_HEB 15/I B     |
  | 114 | 2016-03-03 00:00:00.000 | 1900-01-01 15:15:00.000 | 1900-01-01 16:00:00.000 | SU_SK             | Jakob             | CL_HEB 15/I A     |
  | 115 | 2016-03-03 00:00:00.000 | 1900-01-01 16:15:00.000 | 1900-01-01 17:00:00.000 | SU_SK             | Jakob             | CL_HEB 15/I A     |
  | 119 | 2016-03-03 00:00:00.000 | 1900-01-01 16:15:00.000 | 1900-01-01 17:00:00.000 | SU_SK             | Adlberger         | CL_HEB 15/I B     |
  +-----+-------------------------+-------------------------+-------------------------+-------------------+-------------------+-------------------+
  </code></pre>
  
  <p>As you can see there are entries which starts and ends at the same time.</p>
  
  <p>What I need to do is to merge the cells togheter and delete the needless rows.</p>
  
  <p>The result shoult look like this</p>
  
  <pre><code>+-----+-------------------------+-------------------------+-------------------------+-------------------+-------------------+----------------------------------+
  | Id  |      Assigned Date      |   Assigned Starttime    |    Assigned Endtime     | lesson_subject_id | lesson_teacher_id |         lesson_classes_id        |
  +-----+-------------------------+-------------------------+-------------------------+-------------------+-------------------+----------------------------------+
  | 116 | 2016-03-03 00:00:00.000 | 1900-01-01 13:15:00.000 | 1900-01-01 14:00:00.000 | SU_SK             | Adlberger, Jakob  | CL_HEB 15/I A, CL_HEB 15/I B     |
  | 113 | 2016-03-03 00:00:00.000 | 1900-01-01 14:15:00.000 | 1900-01-01 15:00:00.000 | SU_SK             | Adlberger, Jakob  | CL_HEB 15/I A, CL_HEB 15/I B     |
  | 118 | 2016-03-03 00:00:00.000 | 1900-01-01 15:15:00.000 | 1900-01-01 16:00:00.000 | SU_SK             | Adlberger, Jakob  | CL_HEB 15/I A, CL_HEB 15/I B     |
  | 115 | 2016-03-03 00:00:00.000 | 1900-01-01 16:15:00.000 | 1900-01-01 17:00:00.000 | SU_SK             | Adlberger, Jakob  | CL_HEB 15/I A, CL_HEB 15/I B     |
  +-----+-------------------------+-------------------------+-------------------------+-------------------+-------------------+----------------------------------+
  </code></pre>
  
  <p>Any ideas how I can achieve this? I'm on Sql Server 2008 R2</p>
  
  <p>Regards Lukas</p>