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!

How do we pass Parameters into sql*loader control file ???

525708Jan 23 2008 — edited Jan 12 2011
Dear Members,

How do we pass parameters to the control file using sql*loader. Suppose i have a control file like this :

LOAD DATA
CHARACTERSET WE8ISO8859P1
INFILE 'San Nicolas Weekly 20080117.csv'
APPEND
INTO TABLE hrconv.xcel_person_mx_s2
FIELDS TERMINATED BY ',' optionally enclosed by '"'
trailing nullcols
(legacy_id,
employee_number,
first_name,
middle_names,
last_name,
per_information1,
per_information2,
ppos_attribute1,
date_of_birth2,
ppos_attribute2,
per_information3,
cost_center,
original_date_of_hire,
person_type,
salary_hour,
probation_period_date,
probation_period_end,
probation_period_end2,
sex,
account_number1,
bank_card_number,
national_identifier,
leaving_reason,
company,
marital_status,
actual_termination_date,
ppos_attribute3,
per_information4)

I want the File Name in the INFILE clause to be passed dynamically. i.e for example in the above control file i want 'San Nicolas Weekly 20080117.csv' to be passed dynamically, so that i can have one control file for several data files.

I should do this as a concurrent request . How can we do this. It would be great if any body helps me.

Thanks
Sandeep
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 9 2011
Added on Jan 23 2008
7 comments
8,446 views