title: Using a temp table between stored procedures in SQL Server 2008
body: <p>I currently have a main stored procedure calling many stored procedures:</p>
  
  <pre><code>Main --| 
       --|
         --| &gt; Exec Pre-processing SP (create and populate #temp table)
       --|
         --| &gt; Exec Actual update
       --|
         --| &gt; Exec Post-Process (consume and drop #temp table)
  </code></pre>
  
  <p>The problem I'm currently having is that I need to grab the original values from the database, and the values being passed into the main stored procedure so that I can execute post processing to the update in the last step (stored procedure) being called.</p>
  
  <p>I cannot change the stored procedure signatures or the main stored procedure.</p>
  
  <p>When I try to execute this scenario, I get an invalid object in the post-processing stored procedure.</p>
  
  <p>How can I pass my values from the first stored procedure to the last stored procedure.</p>