任何人都可以找到这个错误在此试图数据加载? 该'\\N'
是因为这是从MySQL的OUTFILE转储,这使\ n为NULL字段的进口。
解码是抓情况下字段可能是空字符串,或有可能\ n。
在Linux上使用Oracle 10g中。
load data
infile objects.txt
discardfile objects.dsc
truncate
into table objects
fields terminated by x'1F'
optionally enclosed by '"'
(ID INTEGER EXTERNAL NULLIF (ID='\\N'),
TITLE CHAR(128) NULLIF (TITLE='\\N'),
PRIORITY CHAR(16) "decode(:PRIORITY, BLANKS, NULL, '\\N', NULL)",
STATUS CHAR(64) "decode(:STATUS, BLANKS, NULL, '\\N', NULL)",
ORIG_DATE DATE "YYYY-MM-DD HH:MM:SS" NULLIF (ORIG_DATE='\\N'),
LASTMOD DATE "YYYY-MM-DD HH:MM:SS" NULLIF (LASTMOD='\\N'),
SUBMITTER CHAR(128) NULLIF (SUBMITTER='\\N'),
DEVELOPER CHAR(128) NULLIF (DEVELOPER='\\N'),
ARCHIVE CHAR(4000) NULLIF (ARCHIVE='\\N'),
SEVERITY CHAR(64) "decode(:SEVERITY, BLANKS, NULL, '\\N', NULL)",
VALUED CHAR(4000) NULLIF (VALUED='\\N'),
SRD DATE "YYYY-MM-DD" NULLIF (SRD='\\N'),
TAG CHAR(64) NULLIF (TAG='\\N')
)
示例数据(记录1)。 该^ _代表不可打印0x1F的分隔符。
1987^_Component 1987^_\N^_Done^_2002-10-16 01:51:44^_2002-10-16 01:51:44^_import^_badger^_N^_^_N^_0000-00-00^_none
错误:
Record 1: Rejected - Error on table objects, column SEVERITY.
ORA-00984: column not allowed here