I have a sql script file that dynamically generates a control file. It accepts date fields in date formats for mm/dd/yyyy. The sqlldr is loading the dates from the csv fi
I found the answer. Date formatting in oracle allows options FX and FM for exact formatting
for example
select to_date('6/21/2016', 'FXfmMM/FXdd/FXYYYY') from dual;
returns 6/21/2016
select to_date('6-21-2016', 'FXfmMM/FXdd/FXYYYY') from dual;
will return error "literal does not match format string"
so in my control file sql script i added the FX and FM commands
' col7 DATE "FXFMMM/FXDD/FXYYYY",' || chr (10) ||
' col8 DATE "FXFMMM/FXDD/FXYYYY",' || chr (10) ||
now only dates with exactly mm/dd/yyyy format will be accepted and the rest will be rejected as a bad row