how do u fnd the duplicate rows and how to delete the
duplicate rows?
Answer Posted / suraj kedia
Hi Sankar...
The methods as told by u r correct but i guess sree has
asked about finding duplicate records and the way to delete
them in oracle not in informatica.
So, the query to find out the duplicate records in a given
table (e.g. emp table) is as below:
select * from emp where empno in (select empno from emp
group by empno where count(*) >1);
Explanation:
============
See, in EMP table there are total 14 records out of which
only empno is unique,rest all fields can be repeated, so the
empno which are repeated more than once are duplicate
records & the above query shows the same.
Query to delete duplicate records;
delete from emp where rowid not in (select max(rowid) from
emp group by empno);
OR
delete from emp where rowid not in (select min(rowid) from
emp group by empno);
OR
delete from emp e1 where rowid < (select max(rowid) from emp
e2 where e1.empno=e2.empno);
OR
delete from emp e1 where rowid > (select min(rowid) from emp
e2 where e1.empno=e2.empno);
| Is This Answer Correct ? | 21 Yes | 3 No |
Post New Answer View All Answers
How to join three sources using joiner? Explain though mapping flow.
What is the benefit of partitioning a session?
Suppose we have two source qualifier transformations sq1 and sq2 connected to target tables tgt1 and tgt2 respectively. How do you ensure tgt2 is loaded after tgt1?
What are the informatica performance improvement tips
what are 3 tech challenges/ common issues you face?
What is the difference between router and filter?
can we override a native sql query within informatica? How do we do it?
how to load dimension table and fact table. plz tell me the steps.
Tell me about Propagate functions in informatica
Make a note of the quantity vaults made in informatica?
Differentiate between router and filter transformation?
how to construct simple biogas digerter? please show me detail drawing and specification of simple biogas construction?
What are the different versions of informatica?
What is target load order?
scenario where i can use only concurrent execution of workflow.