title: SELECT specific columns from EXEC stored procedure
body: <p>I am having an issue trying to <code>SELECT</code> specific columns from an <code>EXEC</code> statement on a stored procedure. I am trying to find the <code>COUNT(*)</code> that the stored procedure returns which I am successfully doing with :</p>
  
  <pre><code>INSERT INTO #temp
  EXEC dbo.my_sp
  SET @count = (SELECT COUNT(*) FROM #temp)
  DELETE FROM #temp
  </code></pre>
  
  <p>However, this only works if the columns returned match specifically with the table columns and since I am trying to find the count of many different stored procedures (each of which return different columns), I cannot use this method without creating a new table for each stored procedure.</p>
  
  <p>Is there a way I can <code>SELECT</code> specific columns from the <code>EXEC dbo.my_sp</code>?</p>