这是我创建的外部表:
CREATE TABLE emp_load
(
"ESN_NO" VARCHAR2 (200),
"MAKER" VARCHAR2 (30),
"HANDSET" VARCHAR2 (20),
"MODEL_NO" VARCHAR2 (20),
"OMH_TTSL_FLAG" VARCHAR2 (10),
"OFFER" VARCHAR2 (100),
"STATUS" VARCHAR2 (20),
"STATUS_UPDATED_DATE" DATE
) ORGANIZATION EXTERNAL (
TYPE ORACLE_LOADER DEFAULT DIRECTORY "EXT_TAB_DIR" ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE skip 1
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
missing FIELD VALUES are NULL
) LOCATION ('BAU.csv')
) ;
BAU.csv
文件样本内容
ESN No Make Model RI_value
A10000428A5348 Lava C180 OFFER14
A10000428A5349 Lava C180 OFFER14
A10000428A534A Lava C180 OFFER14
A10000428A534B Lava C180 OFFER14
它工作正常,但数据没有出现在我需要的列中;我希望该列为handset
空,但当前model
文件中的值已加载到该handset
列中。所以我目前得到:
ESN_NO MAKER HANDSET MODEL_NO OMH_TTSL_FLAG OFFER STATUS STATUS_UPDATED_DATE
A10000428A5348 Lava C180 OFFER14
A10000428A5349 Lava C180 OFFER14
A10000428A534A Lava C180 OFFER14
A10000428A534B Lava C180 OFFER14
我希望handset
跳过该列并model
插入model_no
; 并且omh_ttsl_flag
应该被跳过并且ri_value
文件中的应该被插入到offer
. 所以我想要结束的是:
ESN_NO MAKER HANDSET MODEL_NO OMH_TTSL_FLAG OFFER STATUS STATUS_UPDATED_DATE
A10000428A5348 Lava C180 OFFER14
A10000428A5349 Lava C180 OFFER14
A10000428A534A Lava C180 OFFER14
A10000428A534B Lava C180 OFFER14
如何在将数据加载到外部表时跳过这些列?