title: How to set variable from a SQL query?
body: <p>I'm trying to set a variable from a SQL query:</p>
  
  <pre><code>declare @ModelID uniqueidentifer
  
  Select @ModelID = select modelid from models
  where areaid = 'South Coast'
  </code></pre>
  
  <p>Obviously I'm not doing this right as it doesn't work. Can somebody suggest a solution?</p>
  
  <p>Thanks!</p>