Load data using 'WHEN' and TAB delimited [message #136752] |
Fri, 09 September 2005 19:42 |
siu yu
Messages: 1 Registered: September 2005 Location: Hong Kong
|
Junior Member |
|
|
I tried to load data into one table based on some condition and the data file was using tab delimited. However when the script was completed, only the first condition part was loaded and the second part was ignore. Data that matched the second condition was put to the discard file. Can anyone advise what's wrong with my script?
LOAD DATA
APPEND
-- Type P2 - Overflow Receipt
INTO TABLE AR_PAYMENTS_INTERFACE_ALL
WHEN RECORD_TYPE = ’P2’
REPLACE FIELDS TERMINATED BY X'09'
TRAILING NULLCOLS
(STATUS CONSTANT ’AR_PLB_NEW_RECORD’,
RECORD_TYPE CHAR,
LOCKBOX_NUMBER CHAR,
INVOICE1 CHAR,
AMOUNT_APPLIED1 CHAR,
OVERFLOW_SEQUENCE CHAR,
OVERFLOW_INDICATOR CHAR,
ITEM_NUMBER CHAR,
CURRENCY_CODE CHAR)
-- Type P1 - Payment
INTO TABLE AR_PAYMENTS_INTERFACE_ALL
WHEN RECORD_TYPE = ’P1’
REPLACE FIELDS TERMINATED BY X'09'
TRAILING NULLCOLS
(STATUS CONSTANT ’AR_PLB_NEW_RECORD’,
RECORD_TYPE CHAR,
LOCKBOX_NUMBER CHAR,
BATCH_NAME CHAR,
TRANSIT_ROUTING_NUMBER CHAR,
ACCOUNT CHAR,
CHECK_NUMBER CHAR,
REMITTANCE_AMOUNT CHAR,
DEPOSIT_DATE DATE ’RRMMDD’,
ITEM_NUMBER CHAR,
CURRENCY_CODE CHAR,
DEPOSIT_TIME CHAR)
|
|
|
|