title: Sql Server: cte query with outer table
body: <p>i have this code:</p>
  
  <pre><code>with cte as
  (select m.ID , 1 i from MyTable m union all
   select ID  , cte.i +1 i from cte  where i &lt; 5)
  select * from cte
  </code></pre>
  
  <p>error message: 
  Msg 319, Level 15, State 1, Line 2
  Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.</p>
  
  <p>What is wrong?</p>