Unpivot in 10g
759032Mar 9 2010 — edited Mar 10 2010I need to query a bunch of views and create output like unpivot but with Oracle 10g
Need to query table for one record only but get the results as lines of key-value when the key is the column name and the value is he value in that column.
e.g. I have a table like this:
------------------
id | c1 | c2 | c3 |
------------------
1 | aa | bb | cc |
------------------
2 | dd | ee | ff |
------------------
the query:
SELECT <....> FROM Table where id=1
should bring:
c1, aa
c2, bb,
c3, cc,
Any ideas hot to do it?