SQL Loader Error: “Variable length field exceeds maximum length.”

后端 未结 2 1425
孤独总比滥情好
孤独总比滥情好 2021-01-02 09:00

I have a SQL Loader Control file,

LOAD DATA  
INFILE \'test.txt\'  
INTO TABLE TEST replace  
fields terminated \"|\" optionally enclosed by \'\"\' TRAILING          


        
2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-02 09:41

    +1 for DCookie, but to expand on that it's important to distinguish between data types as specified in a table and data types in a SQL*loader control file as they mean rather different things, confusingly.

    Start with a look at the the documentation, and note that when loading regular text files you need to be using the "portable" data types.

    Varchar is a "non-portable" type, in which:

    ... consists of a binary length subfield followed by a character string of the specified length

    So as DCookie says, CHAR is the thing to go for, and INTEGER EXTERNAL is a very commonly used SQL*Loader data type which you'd probably want to specify for DOCUMENTID etc.

提交回复
热议问题