Hi
I have two queries, one brings back sales data, the other brings back budget data. I am trying to combine the two, but there are a different number of records in both tables as products that were budgeted are no longer sold and products that are being sold, were not budgeted and to get a total budget vs sales figure I need all records to come back so the data is combined. A standard query will not give me the correct results because I am not looking for all the records to match up.
I have tried to build a union query
SELECT Budget.[Part Code], Budget.Description, Budget.[NSV Budget], Budget.[Calendar Wk/Yr], Budget.Name
FROM Budget;
UNION ALL SELECT Sales.[Part Code], Sales.Description, Sales.[SumofNSV], sales.[Calendar Wk/Yr], sales.Name
FROM Sales;
However, the Sumof NSV data is being reported in the same column as NSV budget, but on a different row, so I have 76 rows of data for one product but with some weeks having two rows - one is budget data, one is sales data, but it doesn't identify which is which as the column is headed up 'Budget' only.
Is it possible to do this? I am OK with access, but SQL and VBA are not something I'm familiar with, as the SQL above was heavily helped by various other web pages and stretches my skill to the limit!
many thanks for any help that is offered.
Louise