我能够成功创建表,但每当我拿到外部表时,我都会收到错误
create table xyz ( t1 varchar2(20),t2 varchar(10),t3 varchar(10),t4 date,t5 varchar(10),t6 varchar(10),t7 varchar(10),t8 varchar(20),t9 varchar(25),t10 varchar(60),t11 varchar(60))
ORGANIZATION EXTERNAL (
TYPE ORACLE_LOADER
DEFAULT DIRECTORY DE_DUBFILE
ACCESS PARAMETERS
(
RECORDS DELIMITED BY NEWLINE
BADFILE DE_DUBFILE: 'xyz.bad'
DISCARDFILE DE_DUBFILE: 'xyz.dis'
LOGFILE DE_DUBFILE: 'xyz.log'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
MISSING FIELD VALUES ARE NULL
(
t1,t2,t3,t4 date "YYYYMMDD",t5,t6,t7,t8,t9,
t10 "ORA_HASH(:t1||:t2||:t3 )",
t11 "ORA_HASH(:t6||:t8||:t9 )"
)
)
LOCATION (DE_DUBFILE:'ZZZ'));
我收到以下错误
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01005: syntax error: found "double-quoted-string": expecting one of: "binary_double, binary_float, comma, char, date, defaultif, decimal, double, float, integer, (, no, nullif, oracle_date, oracle_number, position, raw, recnum, ), unsigned, varrawc, varchar, varraw, varcharc, zoned"
KUP-01007: at line 11 column 57
Script Terminated on line 26.
答案 0 :(得分:0)
在我看来," ORA_HASH(:t1 ||:t2 ||:t3)"无法处理。 尝试加载它们(t10和t11)并生成这些字段。