title: EXEC in SELECT statement in SQL
body: <p>I have a Stored Procedure that gets some inputs and returns output (was converted from a function)
  Also, I have a <code>SELECT</code> statement that retrieves data from multiple tables and used to call that function.<br>
  I just want to execute the Stored Procedure within the <code>SELECT</code> statement and get one result set
  Example:</p>
  
  <pre><code>SELECT a, b, c, @var=exec sp_name par1, par2 or
  SELECT col1, col2, col3, exec SP_name par1, par2 output
  </code></pre>