I have a query with period and three columns, which are of different data types.
abc: int
def: decimal
hij: int
Data for these three columns provides come from different queries.
Here is the current result:
Period abc def hij
------ ---- ---- ---
2012-01 10 0.00 4
2012-02 5 0.00 5
2012-03 0 2.40 8
I would like to get the following output:
abc 2012-01 10 0.00
abc 2012-02 5 0.00
abc 2012-03 0 0.00
def 2012-01 0 0.00
def 2012-02 0 0.00
def 2012-03 0 2.40
hij 2012-01 4 0.00
hij 2012-02 5 0.00
hij 2012-03 8 0.00
I would like to use unpivot but it gives me an error of conflict type.