title: Derived table used several times
body: <p>I need to run 3 consecutive queries using the same derived table... I'm using MS SQL Server 2008</p>
  
  <pre><code>Select a,b,c from categories inner join (select x,y,z from derivedTable where…) …
  Select a,b,c from users inner join (select x,y,z from derivedTable where…) …
  Select a,b,c from orders inner join (select x,y,z from derivedTable where…) …
  </code></pre>
  
  <p>Is there a way to run the 3 sql queries at the same time in a way the derived table </p>
  
  <pre><code>(select x,y,z from derivedTable where ...) 
  </code></pre>
  
  <p>is executed only once?</p>
  
  <p>I’m using .net so... I’m wondering if I could return the 3 tables and load a dataset with the 3 tables.</p>
  
  <p>Thanks</p>