0

我从 sql loader 得到以下日志消息。此消息是否“未加载行,因为所有 WHEN 子句均失败。” 一个真正的错误?最后我有一条日志消息说总记录读取为 74256。在 ctl 控制文件中,我在每行中看到记录类型的 38-39 字符,并且基于它我将插入到不同的表中。

Table TEST1_AA:

  42233 Rows successfully loaded.

  0 Rows not loaded due to data errors.

  32023 Rows not loaded because all WHEN clauses were failed.

  0 Rows not loaded because all fields were null.



Table IIR_TEST2_BB:

  0 Rows successfully loaded.

  0 Rows not loaded due to data errors.

  74256 Rows not loaded because all WHEN clauses were failed.

  0 Rows not loaded because all fields were null.



Table IIR_TEST3_CC:

  31 Rows successfully loaded.

  0 Rows not loaded due to data errors.

  74225 Rows not loaded because all WHEN clauses were failed.

  0 Rows not loaded because all fields were null.



Total logical records skipped:          0

Total logical records read:         74256

Total logical records rejected:         0

Total logical records discarded:        1

示例 CTL 文件

选项(错误=9999999999,静默=(反馈),行=1000)

加载数据


进入表 test_HD


附加

当 (038:039) = 'HD'

(

record_sequence_no POSITION(029:037) 十进制外部

,line_type POSITION(040:040) CHAR

,header_record_type POSITION(041:041) CHAR

,enquiry_telephone_number POSITION(042:052) CHAR

,total_amt_last_bill POSITION(053:066) 十进制外部

,total_payment_received POSITION(067:080) 十进制外部

)

进入表 test_AS


附加

当 (038:039) = 'AS'

(

record_sequence_no POSITION(029:037) 十进制外部

,line_type POSITION(040:040) CHAR

,girn 位置(041:047) 字符

,charge_desc POSITION(048:077) 字符

}

4

1 回答 1

1

这不是错误。日志告诉您 72K 记录没有加载到任何地方,因为它们不满足您的任何 WHEN 子句。

换句话说,在 74256 条记录中,31 条在 38 和 39 位有“HD”或“AS”,其余的则没有。您还让它跳过一行(也许第一行是标题行)。

如果您尝试仅加载“HD”和“AS”记录,这是一个成功的结果。

于 2010-11-29T15:15:52.617 回答