How do you eliminate duplicates?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
There is a load to the Table every one hour and 24/7.Morning trafic is high, afternoon trafiic is less, Night trafiic is high.According to this situation which Utility you use and how do you load,which utility used?
How to load specific no.of records using bteq, or fastload,or multiload
What is upsert statement in teradata?
Explain the new features of teradata?
I want to load 1000 rcds using. FL for every 100 records there is a check point.But script failed at 120 records, when we are restarting the script, it starts from last ckpt, but Target table contains populated data but FL doesnt support existing data in target table. How can we load data in FL?
Explain the term 'foreign key' related to relational database management system?
write a query following data. 123.45 is input.write a query after decimal (ex:.45) load into database ?how it possible?
What are the uses of client software involved in teradata?
IS IT POSSIBLE THAT THERE R TWO PRIMARY KEY WILL BE IN A SAME TABLE?PLZ HELP ME BY GIVING THE ANSWER.THANK U.
how many modules are there in telecome domain?how to explain the architecture?
Hello Frndz, I have a table named product as shown below: product_id product_name 1 AAA 1 BBB 1 CCC 2 PPP 2 QQQ 2 RRR Now my output should be: product_id product_name_1 product_name_2 product_name_3 1 AAA BBB CCC 2 PPP QQQ RRR
teradata support to automatically increase the character length or not?