Home » RDBMS Server » Server Utilities » Load data using 'WHEN' and TAB delimited
Load data using 'WHEN' and TAB delimited [message #136752] Fri, 09 September 2005 19:42 Go to next message
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)
Re: Load data using 'WHEN' and TAB delimited [message #136765 is a reply to message #136752] Sat, 10 September 2005 00:02 Go to previous message
Barbara Boehmer
Messages: 9100
Registered: November 2002
Location: California, USA
Senior Member
Multiple when clauses only works with fixed position data. As a workaround you can use two separate control files and do two runs of SQL*Loader.
Previous Topic: SQL LOADER
Next Topic: EXP/IMP - Stored Procedure requires Execution?
Goto Forum:
  


Current Time: Sat Nov 09 01:45:15 CST 2024