导入的ctl文件类容:
load data
infile '/data1/gzqd/chnl_reward/201405/M30038_999_001201405000001.AVL'
append into table QD.SA_JT_MONITOR_201405
Fields terminated by X'09'
(
JT_ID,
JT_NAME,
MONITOR_NO,
MONITOR_NAME,
MONTH_ALL,
MONTH_STATE,
MONTH_ALL_STATE,
DATE_CLASS
)
表结构:
create table SA_JT_MONITOR_201405
(
JT_ID VARCHAR2(50) not null,
JT_NAME VARCHAR2(255) not null,
MONITOR_NO VARCHAR2(50) not null,
MONITOR_NAME VARCHAR2(255) not null,
MONTH_ALL VARCHAR2(50) not null,
MONTH_STATE VARCHAR2(50) not null,
MONTH_ALL_STATE VARCHAR2(50) not null,
DATE_CLASS VARCHAR2(50) not null
)
导入的数据文件:M30038_999_001201405000001.AVL,部分类容:
85152309715,测试数据名称1, 52110092,黄三SA,529.03,642.34,82.36,1
851590107587,测试数据名称2, 59003992,王四,854.16,538.71,158.56,1
851540112381,测试数据名称3, 54007176,陈七,6254.27,1130.01,553.47,1
851590106546,测试数据名称4, 59060050,马八,1854.06,1174.85,157.81,1
851550108627,测试数据名称5, 55090224,罗九,3614.78,2402.97,150.43,1
851570005404,测试数据名称5, 57050181,徐五,2929.53,2047.66,143.07,1
85154303135,测试数据名称6, 54008278,兰十,,,,1
851510132685,测试数据名称6,,,,,,1
85153314671,测试数据名称7), 53006788,罗一,,,,1
851570101035,测试数据名称7, 57000828,冷月,,,,1
85152302387,测试数据名称7, 52011603,王八,,,,1
执行导入报错:
...
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 50: Rejected - Error on table QD.SA_JT_MONITOR_201405, column JT_NAME.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 51: Rejected - Error on table QD.SA_JT_MONITOR_201405, column JT_NAME.
Column not found before end of logical record (use TRAILING NULLCOLS)
MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run.
Table QD.SA_JT_MONITOR_201405:
0 Rows successfully loaded.
51 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 132096 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 51
Total logical records rejected: 51
Total logical records discarded: 0
..
请各位高手帮忙看看
------解决方案--------------------
fields terminated by ","