title: How to get first in and last out of attendance system in SQL Server
body: <p>I have a table <code>IOData</code> as shown below </p>
  
  <pre><code>   E Name   Date            Time    Status
     A1   08/06/14    19:36:10.00 Entry
     A1   08/06/14    19:36:16.00 Exit
     A1   08/06/14    19:36:18.00 Entry
     A1   08/07/14    00:26:39.00 Exit
     A1   08/07/14    00:38:36.00 Entry
     A1   08/07/14    02:41:14.00 Exit
     B1   08/07/14    19:12:29.00 Entry
     B1   08/08/14    04:14:28.00 Exit
     B1   08/08/14    04:14:31.00 Entry
     B1   08/08/14    04:14:33.00 Exit
     C1   08/06/14    19:26:10.00 Entry
     C1   08/06/14    19:36:16.00 Exit
     C1   08/06/14    19:36:50.00 Entry
     C1   08/06/14    23:06:28.00 Exit
  </code></pre>
  
  <p>I want the output as first Entry and Last Exit as show below </p>
  
  <pre><code> EName    Date        Time      Status
     A1    08/06/14   19:36:10.00 Entry
     A1    08/07/14   02:41:14.00 Exit
     B1    08/07/14   19:12:29.00 Entry
     B1    08/08/14   04:14:33.00 Exit
     C1    08/06/14   19:26:10.00 Entry
     C1    08/06/14   23:06:28.00 Exit
  </code></pre>
  
  <p>I have no Idea to perform this task. I have googled but no help. Please do the needful.</p>
  
  <p>Thanks in advance</p>