Code:
SELECT dbo_Envio_Product_Sales_ORM.SalesOrderProcessNumber, dbo_Envio_Product_Sales_ORM.CommodityName, dbo_Envio_Product_Sales_ORM.VarietyDesc, dbo_Envio_Product_Sales_ORM.EnteredQuantity, dbo_Envio_Product_Sales_ORM.EnteredPrice, dbo_Envio_Product_Sales_ORM.BillTo_AccountCode, First(Str(Year([ShipOnDate]))) AS [Year], First(Trim(Str(Year([ShipOnDate]))) & "-" & Format(Month([ShipOnDate]),"00")) AS [Month], First(Str(DateValue([ShipOnDate]))) AS [Date], dbo_Envio_Product_Sales_ORM.Pack, dbo_Envio_Product_Sales_ORM.Type, dbo_Envio_Product_Sales_ORM.Size, dbo_Envio_Product_Sales_ORM.SKU, [EnteredQuantity]*[EnteredPrice] AS SalesAmt
FROM dbo_Envio_Product_Sales_ORM
GROUP BY dbo_Envio_Product_Sales_ORM.SalesOrderProcessNumber, dbo_Envio_Product_Sales_ORM.CommodityName, dbo_Envio_Product_Sales_ORM.VarietyDesc, dbo_Envio_Product_Sales_ORM.EnteredQuantity, dbo_Envio_Product_Sales_ORM.EnteredPrice, dbo_Envio_Product_Sales_ORM.BillTo_AccountCode, dbo_Envio_Product_Sales_ORM.Pack, dbo_Envio_Product_Sales_ORM.Type, dbo_Envio_Product_Sales_ORM.Size, dbo_Envio_Product_Sales_ORM.SKU, [EnteredQuantity]*[EnteredPrice]
UNION
SELECT dbo_Envio_Product_Sales_ORM1.SalesOrderProcessNumber, dbo_Envio_Product_Sales_ORM1.CommodityName, dbo_Envio_Product_Sales_ORM1.VarietyDesc, dbo_Envio_Product_Sales_ORM1.EnteredQuantity, dbo_Envio_Product_Sales_ORM1.EnteredPrice, dbo_Envio_Product_Sales_ORM1.BillTo_AccountCode, First(Str(Year([ShipOnDate]))) AS [Year], First(Trim(Str(Year([ShipOnDate]))) & "-" & Format(Month([ShipOnDate]),"00")) AS [Month], First(Str(DateValue([ShipOnDate]))) AS [Date], dbo_Envio_Product_Sales_ORM1.Pack, dbo_Envio_Product_Sales_ORM1.Type, dbo_Envio_Product_Sales_ORM1.Size, dbo_Envio_Product_Sales_ORM1.SKU, [EnteredQuantity]*[EnteredPrice] AS SalesAmt
FROM dbo_Envio_Product_Sales_ORM1
GROUP BY dbo_Envio_Product_Sales_ORM1.SalesOrderProcessNumber, dbo_Envio_Product_Sales_ORM1.CommodityName, dbo_Envio_Product_Sales_ORM1.VarietyDesc, dbo_Envio_Product_Sales_ORM1.EnteredQuantity, dbo_Envio_Product_Sales_ORM1.EnteredPrice, dbo_Envio_Product_Sales_ORM1.BillTo_AccountCode, dbo_Envio_Product_Sales_ORM1.Pack, dbo_Envio_Product_Sales_ORM1.Type, dbo_Envio_Product_Sales_ORM1.Size, dbo_Envio_Product_Sales_ORM1.SKU, [EnteredQuantity]*[EnteredPrice];