Вы можете использовать CASE
, как в этом примере.
Сначала образец таблицы:
SQL> create table test (id number, qualifying varchar2(10), isnull varchar2(1));
Table created.
Контрольный файл:
load data
infile *
replace
into table test
fields terminated by "|" TRAILING NULLCOLS
(
id,
qualifying "case when :qualifying is null then 'F'
when :qualifying = 'x' then 'T'
else :qualifying
end",
isnull
)
begindata
1||y
2|x|y
3|225|n
Тестирование:
SQL> $sqlldr scott/tiger@xe control=test05.ctl log=test05.log
SQL*Loader: Release 11.2.0.2.0 - Production on Pon O×u 25 16:49:56 2019
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0]
ORA-12545: Connect failed because target host or object does not exist
SQL> $sqlldr scott/tiger control=test05.ctl log=test05.log
SQL*Loader: Release 11.2.0.2.0 - Production on Pon O×u 25 16:50:57 2019
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 2
Commit point reached - logical record count 3
SQL> select * from test;
ID QUALIFYING I
---------- ---------- -
1 F y
2 T y
3 225 n
SQL>