title: Count Minutes Between Current Time and Open Time
body: <p>I have a auxiliary table as</p>
  
  <blockquote>
    <p>Time &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Minute<br>
    2013-01-01 09:00:00.000    1<br>
    2013-01-01 09:01:00.000    1<br>
    2013-01-01 09:02:00.000    1<br>
    2013-01-01 09:03:00.000    1<br>
    2013-01-01 09:04:00.000    1<br>
    2013-01-01 09:05:00.000    1<br></p>
  </blockquote>
  
  <p>(Time range is for every day between 09 and 17).</p>
  
  <p>The next table looks like as follows</p>
  
  <blockquote>
    <p>ID    OPEN_TIME   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TITLE   &nbsp;&nbsp;&nbsp;SLA<br>
    1   &nbsp;2012-12-17 11:46:47.000   &nbsp;&nbsp;AAA <br>
    2   &nbsp;2012-12-18 09:33:18.000   &nbsp;&nbsp;BBB <br>
    3   &nbsp;2012-12-18 13:14:02.000   &nbsp;&nbsp;CCC <br>
    4   &nbsp;2012-12-19 14:23:53.000   &nbsp;&nbsp;DDD <br>
    5   &nbsp;2013-01-03 07:48:11.000   &nbsp;&nbsp;EEE</p>
  </blockquote>
  
  <p>How to count number of minutes from the first table in time interval / range between "current time (systime)" and "OPEN_TIME"? <br>
  + the result (count / sum of minutes) should be added into column SLA afterwards for each record.</p>
  
  <p>Is there any possible solution? (SQL Server) </p>
  
  <p>Thanks!</p>