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: inserting data from file #2

Re: inserting data from file #2

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Fri, 13 May 2005 17:55:16 +0200
Message-ID: <d62id0$o7u$1@news4.zwoll1.ov.home.nl>


Vince <vincent@ wrote:
> Hello there !
>
> okay...apparently, no way to bulk insert data from file using a SQL

Considered external tables? Depends on your version.

> statement. I must use sql*loader. But sql*loader uses a control file
> where is written the target table and I need to make target table
> variable.
> How could I proceed easily ?
>

Why? Why is the target table different?
Standard procedure is:
1) Get the data in - just get it! No constraints, nothing 2) Check the data (field/record/table constraints, etc), by

   loading into another table and/or by procedure 3) proceed loading into production table.

Step 2) and 3) are sometimes combined.
You could have an header record in the external file, containing the table name. Use skip 1 to read all other records. Create an insert/update statement dynamically (see: execute immediate).

-- 
Regards,
Frank van Bortel
Received on Fri May 13 2005 - 10:55:16 CDT

Original text of this message

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