|
-
which is the purpose of your PK?
OR
Why do you need a PK if you check during the data load that your new records are unique?
Before using an IOT I would realy test if there is any benefit of using an IOT. Personnaly I think that it is usefull only if you access a few rows in a query. So my question is what kind of queries are going to be executed against this table?
In case all your columns are not null you may do somthing like:
INSERT ALL
WHEN t.date_column is null THEN
INTO target
WHEN t.date_column is not null THEN
INTO duplicates
SELECT s.*
FROM source s,
(
select * from target
where date_column >= (select min(date_column) from source)
) t
where s.date_column = t.date_column(+)
and s.col_2=t.col_3(+)
and s.col_3=t.col_3(+)
and s.col_4=t.col_4(+)
and s.col_5=t.col_5(+)
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
|