How do you eliminate duplicates?

Answers were Sorted based on User's Feedback



How do you eliminate duplicates?..

Answer / yuvaevergreen

yes...the above option can be used if access has been
provided to create set tables.If not, partition by clause
can be used.
1. create table2 as table1 with no data;
2. insert into table2
sel column1,column2,,,columnn from table1
group by 1,2
qualify row_number() over (partition by
column1,column2,,,columnn order by
column1,column2,,,columnn desc) =1
where table1 is with duplicates and table2 would be target
table.

Is This Answer Correct ?    12 Yes 0 No

How do you eliminate duplicates?..

Answer / guest

Let us consider table ‘B’ containing duplicates.


Create a empty table ‘A’ with set option and send the data
from table ‘B’ to table ‘A ‘so that only unique records will
be inserted. Now drop table ’B’ and rename table ‘A’ with
table ‘B’.

Is This Answer Correct ?    8 Yes 0 No

How do you eliminate duplicates?..

Answer / tdguy

Adding to the above,if enough spool space is available, 1.
create a volatile table with the same structure 2. insert
into volatile table
sel column1,column2,,,columnn from table1 group by 1,2
qualify row_number() over (partition by
column1,column2,,,columnn order by
column1,column2,,,columnn desc) =1
3. delete from target table and insert from volatile table.
All the above steps should be done with the same session.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Teradata Interview Questions

How many macros we can create inside a macro

1 Answers   Wipro,


Can you connect multiload from ab initio?

0 Answers  


How can bottlenecks be identified?

0 Answers  


how to delete duplicate records in multi set table without using any tables

2 Answers   Accenture, Nest, South Nests Software Solution, Spiro Solutions,


Why Multiload and Fastload does not supports SI,JI,RI and TRIGGERS?

4 Answers  






What are the different softwares used with their functions in teradata?

0 Answers  


What are the string manipulation operators and functions associated with teradata?

0 Answers  


Difference between multiload and tpump?

0 Answers  


What is the purpose of using case expression in teradata?

0 Answers  


What are the frequently used data types in teradata?

0 Answers  


How to Skip or Get first and Last Record from Flat File through MultiLoad and TPUMP Utility?

4 Answers   Comsys, IBM,


what happen if a query fail in dispatcher?

1 Answers   Cap Gemini,


Categories