I have a SQL Server table with a name Testwith sample data:
LineNo BaseJanuary BaseFebruary BudgetJanuary BudgetFebruary
1 10000 20000 30000 40000
2 70000 80000 90000 100000
I would like to create the following structure in a SQL Server view (or temporary table, etc.), but I'm stuck ... any ideas / suggestions would be appreciated!
LineNo Month Base Budget
1 January 10000 30000
2 January 70000 90000
1 February 20000 40000
2 February 80000 100000
Note. Figures, for example, for data only, are dynamic.
source
share