title: SQL Server Temp Tables across multiple scripts/tabs
body: <p>I read a quote from Zed Shaw once that said something like "if a software developer writes the same code more than once, he should write a function so he doesn't have to repeat himself". </p>
  
  <p>On a daily basis, I find myself making temp tables in <code>SQL Server</code> more than once per day.  I don't need these tables to live past midnight each day which is why I chose to use a temp table.  However, I have various scripts in different tabs in <code>SQL Management Studio</code> - I have to repeat these temp tables in every one of the scripts in order to reference it, and this seems quite inefficient.  My ultimate goal would be to run a stored procedure that would populate multiple temp tables and have them available to run my analyses.    </p>
  
  <p>Is there a better way to reference the tables than my current usage?  Is there a way to reference the temp tables across all sessions in <code>SQL Server 2008</code>?</p>