title: Return value from exec(@sql)
body: <p>I want get the value from <code>Exec(@sql)</code> and assign to <code>@Rowcount(int)</code></p>
  
  <p>Here is my query:</p>
  
  <pre><code>'SET @RowCount = (select count(*) 
                      FROM dbo.Comm_Services 
                     WHERE CompanyId = '+cast(@CompanyId as char)+' and '+@condition+')'
  </code></pre>