Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Your ideas will be helpful
Hello, all:
I'm import data from schema1.table1 (ASSET_NUM,COMPANY_ID,CONSOLI_ID……) to schema2.table2 (ASSET_NUM,COMPANY_ID,CONSOLI_ID……)using SQL script on Oracle 8i. The situation is like this:
In schema1.table1, it does not has a Primary Key and Table1.ASSET_NUM has duplicated records while values in COMPANY_ID are different. For example:
ASSET_NUM COMPANY_ID ---------- ---------- AA237334 AHI AA237334 DHI
1/ loop a cursor on whole table1? 2/ just duplicate records and then the rest records will be "insert into table2" directly. Then how do I decide which record to drop? Use a second cursor? 3/ screen all the duplicate record into a temp table and create a PK on that table and then decide… (this sounds very redundant)Any ideas how can I do this?
![]() |
![]() |