5

I am trying to load a XML file into a XMLTYPE clob 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 control file works pretty well, except that it load the XML file 7 times. I guess this is because the XML file consists of 7 lines, however, I have no clue how to prevent sql loader from doing his and load the file only once.

Any ideas?

Filburt
  • 17,626
  • 12
  • 64
  • 115
ErikL
  • 2,031
  • 6
  • 34
  • 57

1 Answers1

0

Try this SQL*Loader suggestion:

LOAD DATA 
INFILE 'stocknotify.xml'
append INTO TABLE order_input 
xmltype(XMLDATA)
(
    XMLDATA LOBFILE('stocknotify.xml') TERMINATED BY EOF
)
tale852150
  • 1,618
  • 3
  • 17
  • 23