title: Can I use WITH in TSQL twice to filter a result set like my example?
body: <p>I need to do something like this but SQL Server 2008 doesn't like it. My query is actually more complex than this and I realize this isn't the best way to accomplish what I'm doing but my focus is on the functionality of the WITH statement and not the select and where statements.</p>
  
  <blockquote>
    <p>WITH stuff1 AS (
        select name, startdate, id from employees where startdate > 0 )</p>
    
    <p>WITH stuff2 AS (
        select name, startdate, id from stuff1 )</p>
    
    <p>select * from stuff2 where id > 10</p>
  </blockquote>