Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: using sql*loader from pl/sql

Re: using sql*loader from pl/sql

From: HansF <news.hans_at_telus.net>
Date: Sun, 14 Nov 2004 18:20:11 GMT
Message-ID: <vlNld.151531$df2.72504@edtnps89>


Kaly wrote:

> is there any method to use sql*loader from pl/sql code?
> i heard about doing it with java classes but i can't use it in my
> application
>

SQL Loader runs from the operating system.. PL/SQL [usually] runs 'inside' the database. What you want is possible to use 'external calls' (see Oracle Networking manuals), but not an easy task.

However, another way to accomplish loading is to use External Tables - create the table but define it as 'organization external' and use the SQL*Loader control file syntax to describe the mapping between the external file and the table. IT actually uses the SQL Loader core to load the table at run time. More info in the Utilities manual.

Of course, this only works for some versions of ORacle - since you don't want to mention Oracle versiojn or operating system, I leave it to you to check whether that's applicable.

/Hans Received on Sun Nov 14 2004 - 12:20:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US