1

我有一个 SQL*Loader 控制文件,用于将数据从 XML 文件传输到 Oracle 数据库。我的控制文件如下:

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>"
)

我向 TMP_Employee 添加了一个新列 FULL_TIME,类型为 VARCHAR2(1 BYTE)。
我需要在控制文件中添加列 FULL_TIME,默认值为“0”。我添加如下:

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
)

但这不起作用。知道如何正确地做到这一点吗?

4

0 回答 0