Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Insert data file name into table from sql loader

573332Dec 3 2008 — edited Dec 3 2008
Hi 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 31 2008
Added on Dec 3 2008
3 comments
866 views