title: Building a Case Statement with TIME
body: <p>This is a sample of my code.</p>
  
  <pre><code>PROC SQL;
  
  CREATE TABLE SUCCESS_TIME_INTERVALS AS
  
  SELECT
  
  A.*,
  
  CASE 
  
  WHEN A.TIME BETWEEN  9:00:00 AND 11:00:00 THEN '9AM_11AM'
  
  WHEN A.TIME BETWEEN 11:00:00 AND 13:00:00 THEN '11AM_1PM'
  
  ELSE 'OTHER' END AS TIME_INTERVALS
  
  FROM TABLE1 A
  
  ;QUIT; 
  </code></pre>
  
  <p>I get this error when I run my code</p>
  
  <blockquote>
    <p>ERROR 22-322: Syntax error, expecting one of the following: !!, *, **,
    +, -, /, AND, ||.  </p>
    
    <p>ERROR 76-322: Syntax error, statement will be ignored.</p>
  </blockquote>
  
  <p>Not sure how to fix this.</p>
  
  <p>Many thanks</p>