Home » RDBMS Server » Server Utilities » Inputs to SQL Loader (Oracle 11g)
Inputs to SQL Loader [message #650728] Mon, 02 May 2016 07:04 Go to next message
Arunpandi
Messages: 4
Registered: March 2016
Junior Member
Hi,

Can anyone say how to give inputs to ctl file?

For Example :
File having like this

<country_code1>_<SYSDATE>.dat
<country_code2>_<SYSDATE>.dat
<country_code3_<SYSDATE>.dat
<country_code4_<SYSDATE>.dat
<country_code5>_<SYSDATE>.dat

i am going to insert in the table

T_COUNTRY_DATE

My Loading Script : (As of now)

LOAD DATA

APPEND

INTO TABLE T_COUNTRY_DATE
FIELDS TERMINATED BY "|" OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(
COUNTRY_CODE CONSTANT "<COUNTRY_CODE>",
....
....
....
....
)

Currently we have separate ctl file to load the data with respective country code.
But i don't want like this. Changes in these import making big head ache.
Is there any way to use only one ctl file to upload these files in to single table with their respective COUNTRY_CODE?

Thanks in advance.
Re: Inputs to SQL Loader [message #650730 is a reply to message #650728] Mon, 02 May 2016 07:41 Go to previous messageGo to next message
Michel Cadot
Messages: 67241
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

You can dynamically modify the control file from the script which launches the loader.

Re: Inputs to SQL Loader [message #650734 is a reply to message #650728] Mon, 02 May 2016 08:52 Go to previous message
Mahesh Rajendran
Messages: 10694
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Please search forum. Many examples are out there.
http://www.orafaq.com/forum/t/26733/0/
Previous Topic: EXPDP/IMPDP
Next Topic: SQL Loader - Datatype in LOG file Different from CTL File
Goto Forum:
  


Current Time: Tue Jul 14 09:39:46 CDT 2020