I have the following table and want to create a new table with the data pivoted.
[report date] [Name] [Location] [Desc] [Value]
1/1/2017 Bob Spain Sales 10
1/1/2017 Bob Spain Costs 5
2/1/2017 Bob Spain Sales 20
2/1/2017 Bob Spain Costs 8
1/1/2017 Tom Spain Sales 9
1/1/2017 Tom Spain Costs 4
2/1/2017 Tom Spain Sales 19
2/1/2017 Tom Spain Costs 7
And would like to use Access VBA SQL to pivot the data as follows:
[Report Date] [Name] [Location] [Sales] [Costs]
1/1/2017 Bob Spain 10 5
2/1/2017 Bob Spain 20 8
1/1/2017 Tom Spain 9 4
2/1/2017 Tom Spain 19 7
I see a lot of examples of how to pivot with just 3 columns e.g.; [Report Date] [Desc] [Value]
. Pivoting data in MS Access How can the other attribute columns be carried along?