Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SQL*Loader - run stored procedure

661 views
Skip to first unread message

fahds...@yahoo.com

unread,
Sep 5, 2005, 4:36:18 AM9/5/05
to
I have a CSV file which I want to load into the database. The data will
first be loaded into a "staging" table and then synchronised with the
actual table by calling a stored procedure. And then committed.

SQL*Loader can load the data but can it call the stored procedure? All
of this must be done in the same oracle session... Any help would be
appreciated.

Thanks.

Noel

unread,
Sep 5, 2005, 5:12:32 AM9/5/05
to
Użytkownik fahds...@yahoo.com napisał:

There is no chance for SQL*Loader to run a stored procedure, becouse its
a tool to loading data not to run anything.
SQL*Loader commits data after loading, there is possibility to run both,
loader and procedure from SQL*Plus, or there is possibility to create a
job which runs both loader then procedure.

--
TomekB tb...@go2.pl-l

HansF

unread,
Sep 5, 2005, 10:46:00 AM9/5/05
to
Turn this around a bit. Assuming you are using a reasonable version of
Oracle (which you don't mention, so all of this is speculation)

If you use external tables (CREATE TABLE ... ORGANIZATION EXTERNAL), you
can access the CSV files directly as a [read only] table instead of a
simple load file. That means you can use the data file as a table source
in the read portion of any INSERT, UPDATE, DELETE or SELECT. And that in
turn means you can use it from a stored procedure.

--
Hans Forbrich
Canada-wide Oracle training and consulting
mailto: Fuzzy.GreyBeard_at_gmail.com
*** I no longer assist with top-posted newsgroup queries ***

Volker Pohlers

unread,
Sep 7, 2005, 10:30:38 AM9/7/05
to
HansF schrieb:

> Turn this around a bit. Assuming you are using a reasonable version of
> Oracle (which you don't mention, so all of this is speculation)
>
> If you use external tables (CREATE TABLE ... ORGANIZATION EXTERNAL), you
> can access the CSV files directly as a [read only] table instead of a
> simple load file. That means you can use the data file as a table source
> in the read portion of any INSERT, UPDATE, DELETE or SELECT. And that in
> turn means you can use it from a stored procedure.
>
tip: google for pl loader.
Release 1.4 was free on sourceforge

PLLoader is a fast data processing engine for populating and
manipulating data within Oracle databases. PLLoader provides a simple
and intuitive interface for many data loading applications by allowing
any SQL or PL/SQL to be executed for each line in the input file.
PLLoader provides this flexibility while processing at speeds far faster
than conventional SQL*Load processing.

Actions are defined in PLLoader using standard SQL and PL/SQL,
consequently the interface is immediately familiar to those who have
previously used the Oracle SQL and PL/SQL interfaces.

Volker

0 new messages