'\\N'
是因为这是从mysql导入的输出文件转储,它将\N放入空字段。
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