Insert data file name into table from sql loader
573332Dec 3 2008 — edited Dec 3 2008Hi All,
I have a requirement to insert the data file name dynamically into table using sql loader.
Example:
sqlldr userid=username/passwword@host_string control=test_ctl.ctl data=test_data.dat
test_ctl.ctl
-----------------
LOAD DATA
FILED TERMINATED BY ','
INTO TABLE test
(empid number,
ename varchar2(20),
file_name varchar2(20) ---------- This should be the data file name which can be dynamic (coming from parameter)
)
test_data.dat
----------------------
1,test
2,hello
3,world
4,end
Please help..
Thanks in advance.
Regards
Anuj