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
Enlist some properties of sessions.
can any one give some examples for pre sql and post sql(Except dropping and creating index).
What is fact table? Explain the different kinds of facts.
How to generate sequence numbers?
What are the transformations that cannot be placed between the sort origin and the joiner transformation so that we do not lose the input sort order?
What is informatica powercenter repository?
Is stop and abort are same in informatica?
To import the flat file definition into the designer where should the flat file be placed?
What are Dimensional table?
Briefly define a session task?
What are the different clients of powercenter?
What are the transformations that are not supported in mapplet?
Enlist the advantages of informatica.
What are the databases that informatica can connect to windows?
Explain the aggregator transformation?