title: SQL Server : Insert into table a count of records
body: <p>I'm trying to insert a count but I get and error</p>
  
  <blockquote>
    <p>Incorrect syntax near the keyword 'SET'. </p>
  </blockquote>
  
  <p>Am I going about this the wrong way?</p>
  
  <pre><code>INSERT INTO Timestamp_ActiveReferralscopy
     SET count = (select count(HashID) 
           from [dbo].[T_PTID]
     where date_of_Death is null AND Deduction_Date is null)
  </code></pre>