I was wondering if it is possible in to display some rows as columns in Oracle 11g.
I want to the following
id language text
--------------------------
1 english some example
1 german an example
2 english test
2 german test123
to be displayed like this:
id english german
---------------------------------
1 some example an example
2 test test123
I tried using pivot but wasn't able to figure out how to handle it correctly, since pivot requires an aggregate function.
max()ormin()as vkp has shown in his solution. PIVOT wasn't created for transposing tables; it was created for situations where you may have numbers (dollar amounts etc.) in the "text" column, with several rows perid-languagecombination, and pivoting would be used to add those numbers up, or find the average, etc. So - when you use PIVOT just to transpose a table, you still must usemax()ormin().