You've probably missed the colon (:) sign; here's an example. Table to be loaded:SQL> create table test (due_amt number, due_amt_sgn varchar2(1));
Table created.
SQL>
Control file (which contains some sample data):load data
infile *
replace
into table test
fields terminated by ','
trailing nullcols
(due_amt "decode(:due_amt_sgn, '-', -:due_amt, :due_amt)",
due_amt_sgn
)
begindata
100,+
200,-
300,-
400,+
Loading session:SQL> $sqlldr scott/tiger control=test.ctl log=test.log
SQL*Loader: Release 10.2.0.1.0 - Production on Sri Lip 17 22:43:14 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 3
Commit point reached - logical record count 4
Checking what has been done:SQL> select * from test;
DUE_AMT D
---------- -
100 +
-200 -
-300 -
400 +
SQL>