SQL Loader - 终止后找不到终结符

时间:2014-12-17 20:33:37

标签: sql database oracle loading sql-loader

我正在尝试从SQL Loader加载记录,但它给了我错误 在TERMINATED和ENCLOSED字段后找不到终结符

数据文件:

"00165332",11005,"S","N","N","Logitech Multimedia","لوجيتك مكبرات صوت متعددة الوسائط  Z50 دولفين لون وردي","E","A",12/17/2014 4:25:01 PM,"N","N","N","Y",267,"AE","S"

控制文件:

LOAD DATA
INFILE "/home/dmf/ITEMLOC.txt"
APPEND
INTO TABLE DMF.MIG_ITEM_LOC
FIELDS TERMINATED BY ","
optionally enclosed by '"'
TRAILING NULLCOLS

(
ITEM "SUBSTRB(:ITEM,1,25)",
LOC "TO_NUMBER(:LOC)",
LOC_TYPE "SUBSTRB(:LOC_TYPE,1,1)",
CLEAR_IND "SUBSTRB(:CLEAR_IND,1,1)",
TAXABLE_IND "SUBSTRB(:TAXABLE_IND,1,1)",
LOCAL_ITEM_DESC "SUBSTRB(:LOCAL_ITEM_DESC,1,250)",
LOCAL_SHORT_DESC "SUBSTRB(:LOCAL_SHORT_DESC,1,120)",
STORE_ORD_MULT "SUBSTRB(:STORE_ORD_MULT,1,1)",
STATUS "SUBSTRB(:STATUS,1,1)",
STATUS_UPDATE_DATE "TO_DATE(:STATUS_UPDATE_DATE, 'MM/DD/YYYY  hh:mi:ss PM')",
STORE_PRICE_IND "SUBSTRB(:STORE_PRICE_IND,1,1)",
RPM_IND "SUBSTRB(:RPM_IND,1,1)",
EXT_UIN_IND "SUBSTRB(:EXT_UIN_IND,1,1)",
RANGED_IND "SUBSTRB(:RANGED_IND,1,1)",
PRIMARY_SUPP "TO_NUMBER(:PRIMARY_SUPP)",
PRIMARY_CNTRY "SUBSTRB(:PRIMARY_CNTRY,1,3)",
SOURCE_METHOD "SUBSTRB(:SOURCE_METHOD,1,1)"
)

它给出了LOCAL_SHORT_DESC上的错误,这是阿拉伯语 记录1:已拒绝 - 表DMF.MIG_I​​TEM_LOC,列LOCAL_SHORT_DESC出错。 在TERMINATED和ENCLOSED字段后找不到终结符

可能是什么原因?

1 个答案:

答案 0 :(得分:0)

找到解决方案。 用“。

括起所有数字字段和日期字段

现在加载成功。