Loading an XML file into an xmltype field using sqlLoader

I am trying to load an XML file into an XMLTYPE scrap in oracle 11g. So far, I came up with this control file:

LOAD DATA INFILE 'stocknotify.xml' append INTO TABLE order_input ( xml LOBFILE(CONSTANT 'stocknotify.xml') TERMINATED BY EOF ) 

This management file works very well, except that it loads the XML file 7 times. I think this is because the XML file consists of 7 lines, however I do not know how to prevent the sql bootloader from loading and only load the file once.

Any ideas?

+5
source share
1 answer

Try this SQL * Loader statement:

 LOAD DATA INFILE 'stocknotify.xml' append INTO TABLE order_input xmltype(XMLDATA) ( XMLDATA LOBFILE('stocknotify.xml') TERMINATED BY EOF ) 
0
source

Source: https://habr.com/ru/post/1234268/


All Articles