title: Build an SSRS Dataset that Queries for Data Dependent on Results From a Stored Procedure That Creates a Temp Table to Store Results?
body: <p>I need to build an SSRS report that displays query results from a SQL Azure table. However, one of my where conditions will check for data extracted from a stored procedure (exec team param1, param2) result set. Adding to the complication is that the stored procedure creates a temp table (<code>tempteam</code>) to store the results. How can I write a query for the data I need that specifies the <code>tempteam</code> contents in my where clause?</p>
  
  <p>Sample code    </p>
  
  <pre><code>exec team 9596, 2
  
  select * from tempteam
  </code></pre>
  
  <p>Tempteam sample results</p>
  
  <pre><code>        consid
          9596
          23456
          24354
          20965
          ....
          ....
          .... 
  </code></pre>