user file 有4列,而实际导入只导2,4两列。sql loader版本又低, FILLER功能用不了。
因此只能用POSITION功能。而第三列多为空,因此把3,4两列并一列导入,然后再截取。
OPTIONS (SKIP=1, ERRORS = 10000000)
LOAD DATA
APPEND
INTO TABLE APC_SPIN_MASK_EMPLOYEE_ALL
FIELDS TERMINATED BY WHITESPACE
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS(
EMPLOYEE_NUMBER POSITION(10:17) CHAR,
COUNTRY_CODE POSITION(19:29) CHAR "SUBSTR(:COUNTRY_CODE,LENGTH(:COUNTRY_CODE)-4)",
FILE_NAME CONSTANT "USERENV('FILE_NAME')",
REQUEST_ID INTEGER EXTERNAL "USERENV('REQUESTID')",
USER_ID INTEGER EXTERNAL "USERENV('USERID')",
CREATION_DATE "SYSDATE"
)
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10359218/viewspace-677710/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10359218/viewspace-677710/