Hoping someone with Access & SQL experience would be able to write some SQL code that I could use in MS Access to transform/unpivot some data. I've spent a day trying advise from others who have asked similar questions here, but I have no SQL experience and have failed miserably so far.
Asked
Active
Viewed 100 times
-1
-
Please provide your sample data set and expected outcome as an example. – Raihan Dec 27 '20 at 11:38
-
1Please [research](https://meta.stackoverflow.com/questions/261592/how-much-research-effort-is-expected-of-stack-overflow-users) before asking. Then, make an earnest attempt at solution and come back with *specific* issues. – Parfait Dec 27 '20 at 13:55
1 Answers
1
You can use union all
to unpivot in access:
select item, 'A' as period, a as forecast from tbl_weekly_forecast
union all select item, 'B', b from tbl_weekly_forecast
union all select item, 'C', c from tbl_weekly_forecast
union all select item, 'D', d from tbl_weekly_forecast

GMB
- 216,147
- 25
- 84
- 135