Home » SQL & PL/SQL » SQL & PL/SQL » Calling SQL loader from pl/sql procedure
Calling SQL loader from pl/sql procedure [message #156857] Sat, 28 January 2006 16:02 Go to next message
rekha.battula
Messages: 7
Registered: January 2006
Junior Member
I have to load data from a flat file into oracle database and then have to do some calculations and finally generate a report.

Is there any way we can call SQL loader from a procedure/package?

or Is there any way we can invoke the pl/sql package/procedure from control file of sql loader?

Re: Calling SQL loader from pl/sql procedure [message #156858 is a reply to message #156857] Sat, 28 January 2006 17:49 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10706
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>> Is there any way we can call SQL loader from a procedure/package?
Not unless you can use OCI or java stored procedure and complicate yourself.
>>Is there any way we can invoke the pl/sql package/procedure from control file of sql loader
You can always call a function (as a part of data load to manupulate the data that is being loaded).

>>I have to load data from a flat file into oracle database and then have to do some calculations and finally generate a report
So your options are
Use external tables. Consider the flat file as an oracle table
Search the board for examples.
A good example is here
http://www.dbazine.com/oracle/or-articles/still1
Or
Use UTL_FILE to read the file,load into table and do your business.
Use HTMLDB and customize it.
Re: Calling SQL loader from pl/sql procedure [message #157466 is a reply to message #156858] Thu, 02 February 2006 09:36 Go to previous messageGo to next message
quba
Messages: 4
Registered: January 2006
Junior Member
I have always found UTL_FILE to be the best in this situation. How did you end up resolving this
Re: Calling SQL loader from pl/sql procedure [message #157467 is a reply to message #157466] Thu, 02 February 2006 09:38 Go to previous message
rekha.battula
Messages: 7
Registered: January 2006
Junior Member
I found that UTL_FILE and feature "External Tables" for my situation and I opted for External Tables.
Previous Topic: regarding table creation i want some information urgent................
Next Topic: Defaulting result of less than a second to a second
Goto Forum:
  


Current Time: Sun Sep 25 20:12:26 CDT 2022