Home » RDBMS Server » Server Utilities » Passing file name as parameter from a Concurrent Program, to a control file. (Oracle Applications 11.5.10)
Passing file name as parameter from a Concurrent Program, to a control file. [message #382442] Thu, 22 January 2009 05:54 Go to next message
janacallsu
Messages: 6
Registered: December 2006
Junior Member
Hi guys,
can anyone tell me how to pass file name as a parameter to the control file in SQL loader from a concurrent program?


LOAD DATA
INFILE '%d:\oradev\devappl\ap\11.5.0\bin\%<**file***>'
truncate
INTO TABLE "MHC_INVOICE_TEMP"
WHEN INVOICE_NUMBER!='INVOICE_NUMBER'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(
INVOICE_NUMBER,
INVOICE_DATE,
INVOICE_AMOUNT,
CURRENCY,
SUPPLIER_NUMBER
)


I want to pass the file name as parameter to the infile.

Thanks in advance.

Regards,
Jana
Re: Passing file name as parameter from a Concurrent Program, to a control file. [message #382445 is a reply to message #382442] Thu, 22 January 2009 06:05 Go to previous messageGo to next message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You can't.
Dynamically build your control file or put the input file name on the sqlldr command.

Regards
Michel
Re: Passing file name as parameter from a Concurrent Program, to a control file. [message #382542 is a reply to message #382442] Thu, 22 January 2009 20:00 Go to previous message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
As Michel mentioned, you could pass multiple filenames to SQL*Loader via the command line:

C:\> for %i in ( *.dat ) do sqlldr username/password control.ctl data=%i
Previous Topic: Import -Export
Next Topic: Not able to load the from the flat file.
Goto Forum:
  


Current Time: Sun Apr 28 01:07:09 CDT 2024