I have an SQL*Loader control file which is used to transfer data from an XML file to an Oracle database. My control file is as follows:
options (errors=100,silent=feedback)
load data
infile "dest/TMP-TMP_Employee.xml" "str '</RECORD>'"
replace
into table "TMP_Employee"
TRAILING NULLCOLS
(
DUMMY filler terminated by "<RECORD>",
ID_EMP enclosed by "<ID_EMP>" and "</ID_EMP>",
ORIGINE enclosed by "<ORIGINE>" and "</ORIGINE>",
CODE_TYPE_ORDRE enclosed by "<CODE_TYPE_ORDRE>" and "</CODE_TYPE_ORDRE>",
CODE_STATUS enclosed by "<CODE_STATUS>" and "</CODE_STATUS>",
INDICATOR enclosed by "<INDICATOR>" and "</INDICATOR>"
)
I have added a new column, FULL_TIME, to the TMP_Employee, of type VARCHAR2(1 BYTE).
I need to add the column FULL_TIME in the control file with a default value "0". I added it as follows:
options (errors=100,silent=feedback)
load data
infile "dest/TMP-TMP_Employee.xml" "str '</RECORD>'"
replace
into table "TMP_Employee"
TRAILING NULLCOLS
(
DUMMY filler terminated by "<RECORD>",
ID_EMP enclosed by "<ID_EMP>" and "</ID_EMP>",
ORIGINE enclosed by "<ORIGINE>" and "</ORIGINE>",
CODE_TYPE_ORDRE enclosed by "<CODE_TYPE_ORDRE>" and "</CODE_TYPE_ORDRE>",
CODE_STATUS enclosed by "<CODE_STATUS>" and "</CODE_STATUS>",
INDICATOR enclosed by "<INDICATOR>" and "</INDICATOR>",
IC_REMUNEREE DEFAULT 0
)
But this is not working. Any idea how to do it correctly?