I have data in the database in the below format
And I want output data in this format
BudgetCategoryId | CostCenterDepartmentId | CostCenter | AccountNo | Amount | Timestamp
714 | 135 | 12010194 | 110 | 102000.00 | 01-01-2020
Basically timestamp in the desired result is '01-' + <'MONTH'> + <'YEAR'>
I tried transposing, pivot, unpivot but unfortunately unable to get the desired result.
Column Names:
Id | BudgetCategoryId | CostCenterDepartmentId | Year | AccountNo | CostCenter | Month1 | Month2 | Month3 | Month4 | Month5 | Month6 | Month7 | Month8 | Month9 | Month10 | Month11 | Month12 | Budget
PS: I am very new in SQL (RDBMS)