我從sql加載程序獲取下面的日誌消息。這條消息是「行未加載,因爲所有WHEN子句都失敗了。」一個真正的錯誤? 最後,我有一條日誌消息,稱總記錄讀取爲74256.在ctl控制文件中,我看到每行 中記錄類型的38-39個字符,並基於它我將插入到不同的表中。SQL加載程序錯誤
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文件
OPTIONS(ERRORS = 9999999999,SILENT =(反饋),ROWS = 1000)
負載數據
成表test_HD
附加
時(038:039)= 'HD'
(
record_sequence_no POSITION(029:037)DECIMAL EXTERNAL
,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)DECIMAL EXTERNAL
,total_payment_received POSITION(067:080)DECIMAL EXTERNAL
)
成表test_AS
追加
when(038:039)='AS'
(
record_sequence_no POSITION(029:037)DECIMAL EXTERNAL
,LINE_TYPE POSITION(040:040)CHAR
,girn POSITION(041:047)CHAR
,charge_desc POSITION( 048:077)CHAR
}
也許如果你發佈了一個沒有加載的記錄樣本,你認爲應該發生在他們和你的控制文件的相關部分,你可能會得到一個有用的迴應。據我所見,你有一個74256記錄的源文件,其中一些被加載到一個表中,其中一些被加載到另一個表中。我其實沒有看到任何問題。 – 2010-11-26 05:39:34
顯然你的控制文件中有一個WHEN子句,所以你應該發佈該控制文件和一些被跳過的行(正如Gary已經提到的) – 2010-11-26 08:40:01