title: Assign INT Variable From Select Statement in SQL
body: <p>Why do I get a syntax error on the following SQL statements:</p>
  
  <pre><code>DECLARE @Count90Day int;
  
  SET @Count90Day =  SELECT COUNT(*) FROM Employee WHERE DateAdd(day,30,StartDate) BETWEEN
  DATEADD(day,-10,GETDATE()) AND DATEADD(day,10,GETDATE())  AND Active ='Y' 
  </code></pre>
  
  <p>I am trying to assign the number of rows returned from my Select statement to the variable @Count90Day.</p>