title: How to create a View with a With statement?
body: <p>I have a query which contains the following in the beginning:</p>
  
  <pre><code>; With xxx as xxxxx
  </code></pre>
  
  <p>I am unable to create the view with the statement and it is vital that I keep this statement.</p>
  
  <p>Edit: here is the code:</p>
  
  <pre><code>; with numbered as (
  Select part,taarich,hulia,mesirakabala,
  rowno = row_number() OVER (Partition by parit    order.by taarich)
  From tblMK)
  Select a.rowno-1,a.part,  a.Julia,b.taarich,as.taarich_kabala,a.taarich,  a.mesirakabala,getdatediff(b.taarich,a.taarich) as due
  From numbered a
  Left join numbered b ON b.parit=a.parit
  And b.rowno = a.rowno - 1
  Where b.taarich is not null
  </code></pre>