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: Loading data in DB from a variety of sources

Re: Loading data in DB from a variety of sources

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Tue, 09 Sep 2003 23:55:19 -0700
Message-ID: <1063176901.828201@yasure>


Pinaki wrote:

>Hi everybody,
>
>I need to load data into the database(Oracle
>9i,Release2,OS-Win2k,Professional) from a variety of sources like
>.txt,.mdb(Access),.xls(Excel) etc.I have thought of using sqlldr for
>the job but I have to embed a lot of programming logic depending on
>which data will be loaded.
> Can I embed programming logic(through PL/SQL) while using
>sqlldr?Are there any built-in packages which can help me in reading
>these kind of files and load data in the tables in the database
>
>thanks,
>pinaki
>
>

Strikes me that you need to read the documentation.

Basically you have four choices:

  1. Use SQL*Loader and learn it well enough, including using functions within the control file to solve the problem.
  2. Use SQL*Loader, blow the records into a staging table and parse them out from there with a proc or trigger
  3. Use UTL_FILE in a proc.
  4. Set up your files as external tables and load them using a proc.

The one thing you can not do is use PL/SQL in SQL*Loader unless it can all be written as very simple functions.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Wed Sep 10 2003 - 01:55:19 CDT

Original text of this message

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