Multiple values of same element in XML Mapping to Oracle single field
832560Oct 31 2011 — edited Oct 31 2011Hi,
I need to insert data into EMP table reading from xml file and this is how the file would look like....
<?xml version='1.0'?>
<ROWSET>
<ROW num="1">
<EMPLOYEE_ID>7369</EMPLOYEE_ID>
<LAST_NAME>Smith</LAST_NAME>
<FIRST_NAME>JOHN</FIRST_NAME>
<PHONE> 905000123</PHONE>
<PHONE> 905000456</PHONE>
<PHONE> 905000789</PHONE> ...... n
(There could be many phone numbers in the xml file and I need to concatenate all the numbers and insert in the PHONE column of emp table)
<SALARY>800</SALARY>
</ROW>
<!-- additional rows ... -->
</ROWSET>
I am new to XML and would to know the set of lines required to read the data from xml and insert into EMP table. All this is for Oracle 10g R2.
Please let me know solution using XSU if possible.