![]() |
|
Archives of the TeradataForumMessage Posted: Fri, 21 Jun 2013 @ 12:35:34 GMT
Trying following steps. This will be much faster and will maximize the data availability for Table1 as well. Step 1.
create table Table1_test as Table1 with no data;
Step 2
insert into Table1_test
select * from FROM Table1
WHERE (key1, key2) not IN
(
SELECT UNIQUE key1, key2 FROM Table2
);
Step 3
drop table Table1;
Step 4
rename table Table1_test to Table1;
Thanks, Gautam Poddar
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||