Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

load XML Files using SQL Loader

muttleychessJul 23 2019 — edited Jul 24 2019

Hi

I have a table  as

CREATE TABLE SAMPLE_XML

(

  TYPEXML  SYS.XMLTYPE

)

and a xml like

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<Level_1>

    <x11>value11</x11>

    <Level_2>

        <x21>value21</x21>

        <x22>value22</x22>

        <Level_3>

            <x31>value31</x31>

            <x32>value32</x32>

        </Level_3>

    </Level_2>

</Level_1>

I build a Ctl

OPTIONS (DIRECT=TRUE, PARALLEL=FALSE)

LOAD DATA

INFILE 'C:\amostra.xml'

BADFILE './SAMPLE_XML.BAD'

DISCARDFILE './SAMPLE_XML.DSC'

APPEND INTO TABLE SAMPLE_XML

XMLType(TYPEXML)

(

  TYPEXML  LOBFILE(filename) TERMINATED BY EOF

)

   When Start call of ctl with loader return me error :

SQL*Loader-416: SDF clause for field TYPEXML in table SAMPLE_XML references a non existent field.

What's wrong with my control file?

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

PL/SQL Release 11.2.0.4.0 - Production

CORE    11.2.0.4.0    Production

TNS for Linux: Version 11.2.0.4.0 - Production

NLSRTL Version 11.2.0.4.0 - Production

This post has been answered by Gaz in Oz on Jul 24 2019
Jump to Answer
Comments
Post Details
Added on Jul 23 2019
1 comment
301 views