title: Getting an error of 'Token Unknown' while Execute Stored Procedures
body: <p>I'm new in learning stored procedures in <strong>SQL</strong>. </p>
  
  <p>I want to create a stored procedure for inserting values from automatic data by calculation.</p>
  
  <p>Table <code>Attendance</code>:</p>
  
  <pre><code>EMPL_KODE |EMPL_NAME  |DATE_IN    |TIME_IN |TIME_OUT|TIME_IN |TIME_OUT
  001       | Michel    |25.04.2016 |06:50   |15:40   |        |
  002       | Clara     |25.04.2016 |06:15   |15:43   |        |
  003       | Rafael    |25.04.2016 |06:25   |15:45   |        |
  001       | Michel    |26.04.2016 |06:23   |15:42   |        |
  002       | Clara     |26.04.2016 |06:10   |15:41   |        |
  003       | Rafael    |26.04.2016 |06:30   |15:42   |        |
  001       | Michel    |27.04.2016 |06:33   |15:42   |        |
  002       | Clara     |27.04.2016 |06:54   |15:44   |        |
  003       | Rafael    |27.04.2016 |07:00   |15:45   |        |
  </code></pre>
  
  <p>I want to fill <code>TIME_IN</code> and <code>TIME_OUT</code> values automatically by creating a stored procedure. Here is the code :</p>
  
  <pre><code>CREATE PROCEDURE InsertTotalEmployee
      @TOTAL_MINUTES int,
      @TOTAL_HOURS float
  AS
  BEGIN
      INSERT INTO ATTENDANCE (TOTAL_MINUTES, TOTAL_HOURS)
      VALUES (
         SELECT 
             DATEDIFF(MINUTE, ATTENDANCE.TIME_IN, ATTENDANCE.TIME_OUT),
             DATEDIFF(MINUTE, ATTENDANCE.TIME_IN, ATTENDANCE.TIME_OUT) / 60.0
      )
  END 
  </code></pre>
  
  <p>After I write and execute my statement, a message error occurs:</p>
  
  <blockquote>
    <p>Token unknown - line 2, column 5 @</p>
  </blockquote>
  
  <p>I run the code using Flamerobin.</p>