|
-
Is this PK an number which will/should always increase?
If YES you might do the following:
Create an external table (source)
Find out the min and max value from the pk of the source
Using these 2 values you then could do an:
insert /*+ append */ into target
as select s.*
from source s,
(select pk_id from target where pk_id between MIN_SOURCE_PK_ID and MAX_SOURCE_PK_ID) t_pk
where s.pk_id = t_pk.pk_id(+)
and t_pk.pk_id is null
insert /*+ append */ into duplicates
as select s.*
from source s,
(select pk_id from target where pk_id between MIN_SOURCE_PK_ID and MAX_SOURCE_PK_ID) t_pk
where s.pk_id = t_pk.pk_id
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|