title: Html output of a stored procedure into a table or variable
body: <p>I have a stored procedure dbo.someprocedure which takes input as sql query and returns Html table format.</p>
  
  <pre><code>Exec someprocedure 'Select * from dbo.Table'
  </code></pre>
  
  <p>This html I would like to insert into a table or a variable so that I can perform few changes on the result html. </p>
  
  <p>I tried using </p>
  
  <pre><code>Declare @variable varchar(max)
  Exec @variable = someprocedure 'Select * from dbo.Table' 
  </code></pre>
  
  <p>it is executing but returning 0 the variable is not assigned.</p>
  
  <p>Thanks in advance, looking for your answer. </p>