Hi, I have some query that produces following result:
A B C D
----------------- ------------------ ------------------ ------------------
DATE 2013-01-31 2013-02-28 2013-03-31
VALUE1 552488.86520999996 553429.08377000003 548169.86664999998
VALUE2 26883.37285 24362.411590000003 24697.108139999997
I would like to do 'simple' transposition and get result like this:
DATE VALUE1 VALUE2
----------------- ------------------ ------------------
2013-01-31 552488.86520999996 26883.37285
2013-02-28 553429.08377000003 24362.411590000003
2013-03-31 548169.86664999998 24697.108139999997
Now, if I use PIVOT clause, I get everything in one row only with different colums names. If I use UNPIVOT I get only two columns with mixed values and dates. It's quite useless for me...
So, how to achieve this? I search for quite simple solution, because real dataset is much, much larger and I would to avoid dynamic, monster queries :P
Db version: 11.2.0.3.0