• 246
    0

    Below is the example of SQL query to read / extract data from XML in Oracle. You can query any XML easily by providing its namespace clause and the path information through SQL query. Suppose you have XML data in the following format: <main>  <DATA_RECORD>    <EMPNO>7369</EMPNO>    <ENAME>SMITH11V9</ENAME>    <JOB>CLERK</JOB>    <MGR>7698</MGR>    <HIREDATE>1980/12/17 ...
  • 126
    0

    Pass the Xml filename parameter to this procedure to import that file. Before running this procedure create the table xmltbl with the fields as the tag name e.g. <Name>Abc</Name> for this Name tag field Name should be there in xmltbl. CREATE OR REPLACE PROCEDURE Xml_Insert (infile In varchar2)As   Vinput     Varchar2 (1000);   Nstart     Number             := 1;   ...