I am facing an issue with using sql*loader. I want to load two data files into one table. While loading the data I have to set a column value based on which file the loader uses. I will have to pass the data file name thru command line parameter.
Can anyone give the code to do this?
Data File names:
One control file:
The control file should look like....
when substr(<file_name>,1,5) = 'mproc'
data2 constant 'M'
when substr(<file_name>,1,5) = 'sproc'
data2 constant 'S'
my doubt is, how to get the <file_name> in the when clause.