The documentation at:
says:
Loading Records Based on a Condition
You can choose to load or discard a logical record by using the WHEN clause to test a condition in the record.
The WHEN clause appears after the table name and is followed by one or more field conditions. The syntax for field_condition is as follows:
fld_cond ::=
[(] {full_fieldname | pos_spec} operator {'char_string' | X'hex_string' | BLANKS} [)] AND
For example, the following clause indicates that any record with the value "q" in the fifth column position should be loaded:
WHEN (5) = 'q'
A WHEN clause can contain several comparisons, provided each is preceded by AND. Parentheses are optional, but should be used for clarity with multiple comparisons joined by AND, for example:
WHEN (deptno = '10') AND (job = 'SALES')
So, it’s pretty clear that you can compare only against 'char_string', which is not useful in your case, since you want to compare dates.
Another way to achieve what you want is load all your data into a temporary table and move from there only the desired rows to the permanent table.
You might also consider forcing the 'older' rows not be loaded so these rows will end up in the bad file.
Let me explain myself -
says:
-- Applying SQL Operators to Fields --
A wide variety of SQL operators can be applied to field data with the SQL string. This string can contain any combination of SQL expressions that are recognized by the Oracle database server as valid for the VALUES clause of an INSERT statement.
I tried the following:
create table tst (
x date
)
insert into tst values ( case when sysdate < sysdate-45 then sysdate
else to_date('12012003','MMDDYYYY') end )
So, in the else clause you can use incorrect format mask (like 'MMDYYYY') and the row won't be loaded.
The control file from this page has this example:
LOAD DATA
INFILE *
APPEND INTO TABLE XXX
( "Last" position(1:7) char "UPPER

\"Last\"

"
FIRST position(8:15) char "UPPER

FIRST)"
)
In your case the line about this date column should roughly look like:
date_column "case when :ncm_date > sysdate-45 then :ncm_date
else to_date('12012003','MM
DYYYY') end " ,
Regards,
Dan