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

Home -> Community -> Usenet -> c.d.o.misc -> HELP : DATABASE TRANSFERT

HELP : DATABASE TRANSFERT

From: <ulysse51_at_my-deja.com>
Date: Thu, 23 Dec 1999 16:45:28 GMT
Message-ID: <83tjhs$m9b$1@nnrp1.deja.com>


hi there,

i've got 2 tables which are exactly the same. One is empty and the other contains 30000 lines. i want to insert in the empty table 1000 lines per 1000 lines of the other table. i have tryed 2 solutions:

insert into table1 select * from table2 where ROWNUM between CPT1 and CPT2 in this query CPT1 and CPT2 are variables, but CPT1 must be equal to 0. so i can do 0 to 1000 but not 1000 to 2000

the second solution is
insert into table1 select * from (select A.*,ROWNUM R FROM (select * from table2) A where rownum <= CPT1) WHERE R >= CPT2

in this solution there is no probleme with the select i can do it for CPT1 := 1000 and CPT2 := 2000
but the probleme is that there is 1 new field named R ,so the Insert is impossible

THANK YOU FOR YOUR HELP
REGARDS Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Dec 23 1999 - 10:45:28 CST

Original text of this message

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