SQLLDR 加载单列文件

SQLLDR load file with single column

第一次使用 sqlldr,只是试图加载一个单列的文件,但找不到合适的方法:( 我应该把什么作为分隔符?

这是我的 .ctl 文件:

load data
 infile 'myfile.dat'
 into table mytable
 fields terminated by ''
 (mycolumn)

我在 .log 中不断收到错误,例如:

Record 4: Rejected - Error on table ..., column ....
ORA-12899: value too large for column "... (actual: 80, maximum: 24)

即使文件中的值每个最多 8 个字符或 smth : 字符串 1 字符串 2 字符串 3

任何帮助将不胜感激。

非常感谢, G

在这种情况下,您不需要 fields terminated by 行,但您应该有 TRUNCATEAPPEND 行,具体取决于您是否要保留现有数据。

load data
infile 'myfile.dat'
truncate
into table mytable
(mycolumn)

为什么不直接将列的大小更改为 80 改变 table 修改 varchar2(80)