title: Execute store procedure like a "table" for SELECT operator (MS SQL SERVER)
body: <p>Is it possible to execute store procedure 
  like a "table" for <code>SELECT</code> operator (MS SQL SERVER)?</p>
  
  <p>Something like </p>
  
  <pre><code>SELECT TotalSum FROM exec MyStoreProcedure '2011/11/01', '2011/11/01'  
  </code></pre>
  
  <p>I mean somehow integrate it into the <code>SELECT</code> operator?</p>
  
  <p>Thank you!</p>
  
  <hr>
  
  <p>Thanks guys!</p>
  
  <p>The solution what I did is based on your answers:</p>
  
  <pre><code>declare @result table (f1 varchar(20),f2 varchar(20), CodProducto int, NomProducto varchar(1000), Costo decimal, Cantidat int, Total decimal)
  INSERT INTO @result exec  MyStoreProcedure '20111201', '20111201'
  select * from @result
  </code></pre>