title: T-Sql How to return a table from a storedproc in another stored proc
body: <p>I would like to do the following.  Basically have a stored procedure call another stored procedure that returns a table.    How is this done? </p>
  
  <pre><code>    ALTER PROC [GETSomeStuff]
      AS
      BEGIN
  
      @table = exec CB_GetLedgerView @accountId, @fromDate, @toDate, @pageSize, @pageNumber, @filter, @status, @sortExpression, @sortOrder, @virtualCount OUTPUT
  
     Select * from @table
     --Do some other stuff here        
      END
  </code></pre>