My Oracle Support Banner

How To Split Elements Into Records (Doc ID 750585.1)

Last updated on APRIL 29, 2020

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.6 and later
Information in this document applies to any platform.
Information in this document applies to any platform.

Goal

How to generate two rows out of one xml document with sequenced elements?

This is the original row:

create table customer_xt
(doc clob);


This is the result:

<NAME>Richard xx</NAME><NAME>Maira Joes</NAME>
<EMAIL>Richard.xx@example.com</EMAIL><EMAIL>Maira.xx@example.com</EMAIL>
<ADDRESS>Someroad, Somecity, Redwood xx, CA xx, U.S.A</ADDRESS><ADDRESS>S omeroad, Somecity, Redwood xx, CA xx, U.S.A</ADDRESS>
<PHONE>xx</PHONE><PHONE>xx</PHONE>
<DESCRIPTION>Very Important US Customer</DESCRIPTION><DESCRIPTION>Very Important
US Customer</DESCRIPTION>

1 row selected.


How can we break that into two rows, one per Customer?

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.