Questions tagged [pivot-xml]

PIVOT XML is an Operator in Oracle Database

The PIVOT operator takes data in separate rows, aggregates it and converts it into columns.

Adding the XML keyword to the PIVOT operator allows us to convert the generated pivot results to XML format. It also makes the PIVOT a little more flexible, allowing us to replace the hard coded IN clause with a subquery, or the ANY wildcard.

4 questions
3
votes
2 answers

PIVOT XML - dynamic extracting field out to columns

I have posted an original question on this thread: PIVOT Oracle - transform multiple row data to single row with multiple columns, no aggregate data enter link description here The results I wanted was achieved using this statement: select * from…
user1205746
  • 3,110
  • 11
  • 44
  • 73
2
votes
0 answers

Convert Pivot xml output to tabular output without xml

I have following kind of table: ID | Key | Value -- --- ----- 1 A aa 2 B bb 3 A ay 4 C cc 5 B bx 6 C ct I need the output : A B C --- --- --- aa bb cc ay bx ct When I…
OutOfMind
  • 874
  • 16
  • 32
2
votes
1 answer

PIVOT or PIVOT XML without listing the columns explicitly on Oracle

I am working on PL/SQL Developer v10 on Oracle 11g database. The idea is instead of writing 145 columns listed in PIVOT statement write an Pivot XML and get data from there, I am working on a basis of this answer, as I have never done PIVOT XML…
Matas Vaitkevicius
  • 58,075
  • 31
  • 238
  • 265
0
votes
0 answers

pivot XML parsing

I have problem exactly like the post: Parse xmltype into table after pivot xml I want to use pivot xml and then parse the xml (maybe with xmltable function) to table. What can I do if I don't know the countries name and how many countries…