我在 oracle 数据库中有一个表:TABLESPACES,列 DATA_TIME 是类型:日期。还有一个想要像这样修补的数据文件:
ALTAIR ;08-01-2019 10:33:28 ;SUB_DATA
ALTAIR ;08-01-2019 10:33:28 ;SUB_IDX
ALTAIR ;08-01-2019 10:33:28 ;SYSAUX
我的控制文件如下所示:
load data
infile '/home/oracle/space_monitor/logs/space_monitor.log'
INTO TABLE TABLESPACES
APPEND
Fields terminated by ";"
(
DB "TRIM(:DB)",
DATA_TIME "TRIM(:DATA_TIME)",
NAME "TRIM(:NAME)"
)
尝试加载数据时出现错误:
Record 1: Rejected - Error on table TABLESPACES, column DATA_TIME.
ORA-01843: not a valid month
当我使用 TIMESTAMP 文件对控件进行更改时,如下所示:
load data
infile '/home/oracle/space_monitor/logs/space_monitor.log'
INTO TABLE TABLESPACES
APPEND
Fields terminated by ";"
(
DB "TRIM(:DB)",
DATA_TIME "to_date(:TIMESTAMP, 'DD-MM-YYYY HH24:MI:SS')",
NAME "TRIM(:NAME)"
)
我有错误:
SQL*Loader-291: Invalid bind variable :TIMESTAMP in SQL string for column DATA_TIME.
在我的数据库 oracle 参数中:
NLS_DATE_FORMAT like RR/MM/DD
NLS_TIMESTAMP_FORMAT like RR/MM/DD HH24:MI:SSXFF
请帮我。