You forgot to add alias at the end of your request.
You can do this in two ways:
1. If you have already created a table, you can do this with Insert Into as follows:
INSERT into foo (CalMonth,CalYear,InvoiceDate,StockCode,QtyInvoiced,Volume) SELECT * FROM ( SELECT DATEPART(MONTH,a.InvoiceDate) as CalMonth ,DATEPART(YEAR,a.InvoiceDate) as CalYear ,a.InvoiceDate ,a.StockCode ,a.QtyInvoiced ,a.Volume FROM sales a UNION ALL SELECT ds.CalMonth as CalMonth ,ds.CalYear as CalYear ,ds.InvoiceDate ,ds.StockCode ,ds.Cases as QtyInvoiced ,ds.Vol as Volume FROM sales1 ds ) AS table1
For example, see this script.
2. If you have not created a table, you can do this with SELECT * INTO as follows:
SELECT * INTO foo from ( SELECT DATEPART(MONTH,a.InvoiceDate) as CalMonth, DATEPART(YEAR,a.InvoiceDate) as CalYear, a.InvoiceDate, a.StockCode, a.QtyInvoiced, a.Volume FROM sales a UNION ALL SELECT ds.CalMonth as CalMonth, ds.CalYear as CalYear, ds.InvoiceDate, ds.StockCode, ds.Cases as QtyInvoiced, ds.Vol as Volume FROM sales1 ds ) AS table1
For example, see this script.
For details, see SQL SERVER - Inserting data from one table into another table - INSERT IN SELECT - SELECT IN TO TABLE