title: Can I use multiple "with"?
body: <p>Just for example:</p>
  
  <pre><code>With DependencedIncidents AS
  (
      SELECT INC.[RecTime],INC.[SQL] AS [str] FROM
      (
          SELECT A.[RecTime] As [RecTime],X.[SQL] As [SQL] FROM [EventView] AS A 
          CROSS JOIN [Incident] AS X
              WHERE
                  patindex('%' + A.[Col] + '%', X.[SQL]) &gt; 0
      ) AS INC
  )
  
  With lalala AS
  (
      SELECT INC.[RecTime],INC.[SQL] AS [str] FROM
      (
          SELECT A.[RecTime] As [RecTime],X.[SQL] As [SQL] FROM [EventView] AS A 
          CROSS JOIN [Incident] AS X
              WHERE
                  patindex('%' + A.[Col] + '%', X.[SQL]) &gt; 0
      ) AS INC
  )
  </code></pre>
  
  <p>...doesn't work. "Error near With". </p>
  
  <p>Also, I want to use first with inside second with. Is it real or I need to use temp tables?</p>