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

Home -> Community -> Mailing Lists -> Oracle-L -> Data load question

Data load question

From: Sandeep Dubey <dubey.sandeep_at_gmail.com>
Date: Fri, 7 Apr 2006 14:03:03 -0400
Message-ID: <bf2f74740604071103r79bf01acqade572a79d26d63@mail.gmail.com>


I need to load data from one table to two tables. It is kind of noramlizing the data.

As an example:
Source table:
Table A(col1, col2)

A1,B1
A1,B2
A2,B3
A2,B4
A3,B5

From this table I need to insert into Table B and C

I wan to insert data into B and C as:

Table B(id, col1) id is synthetic pk from sequence

1,A1
2,A2
3,A3

Table C(id, col2,B_id) id is pk, b_id is fk to B.id

1,B1,1
2,B2,1
3,B3,2
4,B4,2
5,B5,2

Source table A has 2 million rows. I am trying to do through a single select on table A and using insert into .. select. Or using FORALL.

Any good ideas on how to do this?

Regards

Sandeep

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Apr 07 2006 - 13:03:03 CDT

Original text of this message

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