title: WITH clause in SQL Server 2014
body: <p>I have a query </p>
  
  <pre><code>With Price as
  (
        select DISTINCT ID, A,B,C,D from AB_TABLE
        WHERE TYPE = 'FULL'
  )
  </code></pre>
  
  <p>I need to able to join this with another query</p>
  
  <pre><code>With New_Price as
  (
        select DISTINCT ID, A,B,C from AB_TABLE
        WHERE TYPE = 'HALF'
  )
  </code></pre>
  
  <p>How could I achieve this? I need this query for creating a view, so cant use SELECT with the WITH clause.
  My apologies if this is confusing. But the query inside Price and New_Price is actually complicated and I want to join both of them to show records from both of them, probably by applying a UNION. Can someone please help here.</p>