Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sql Loader ctl file not working

Divya AggarwalDec 22 2025

Hi,

I have the following file:

"000","2025/12/09","001"
"001","MXN","02","00018.18600000","USD"

Control file is:

LOAD DATA
REPLACE
INTO TABLE TABLE_A
WHEN record_number <> '000'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(
record_number,
from_currency,
approval_time,
exchange_rate,
to_currency
)

INTO TABLE TABLE_B
WHEN record_number = '000'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(
record_number,
date_created,
recordcount
)

The ctl file doesnt work on the when condition. Table A gets loaded but Table B doesnt.

Comments
Post Details
Added on Dec 22 2025
4 comments
55 views