Inserting fetched records into new table
Instead of a SELECT you just follow the CTE with a SELECT INTO:

;WITH cte AS 
(
   SELECT x = CONVERT(int, 1)
)
SELECT x INTO dbo.TrashMe FROM cte;


With your new query:

; with dub as
(
  select docnumber, sum(amount) summedamount 
  from stg_invoice_cust_vw where year(crmcreateddatetime)=2017
  group by docnumber
  having count(docnumber)&gt;1
)
select 
  dub.docnumber, 
  dub.summedamount, 
  sup.slamount SLAmount,
  (dub.summedamount - sup.slamount) diff 
-----------
INTO dbo.NEW_TABLE_NAME --&lt;--------------------------- *** HERE ***
-----------
from STG_INVOICE_SUP_VW sup 
inner join dub on dub.docnumber = sup.docnumber
where (dub.summedamount - sup.slamount) &lt;&gt; 0


Note you can only do this once... the next time you run this code, you will get an error that NEW_TABLE_NAME already exists.