how do u fnd the duplicate rows and how to delete the
duplicate rows?

Answers were Sorted based on User's Feedback



how do u fnd the duplicate rows and how to delete the duplicate rows?..

Answer / 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

how do u fnd the duplicate rows and how to delete the duplicate rows?..

Answer / sankar

repet(more then one time) the rows is duplicate rows,
there r many ways to dele the duplicate rows
1.in source qualifies t/r select the DISTINC option
2.in aggreter t/r select the group by port
3.in sorter t/r select the distinc

Is This Answer Correct ?    5 Yes 4 No

Post New Answer

More Informatica Interview Questions

What is the difference between a shortcut of an object and copy of an object? Compare them.

3 Answers  


HOW TO GET THE LATEST DATA IN SCD ?

4 Answers   TCS,


in informatica,if i have some no.of records,if i want 1st and 10th records..what will be the method to use?

11 Answers   L&T,


whats the logic to load the lower level of granularity of data to fact table.

0 Answers   IBM,


difference between shortcut and reusable transformation?

2 Answers  






we have 20 records in source system, when we run for the 1st time, it should load only 10 records into the target, when you run for the second time it should load another 10 record which are not loaded. How do we do that? Can we write a SQL query in source qualifier to do it. This q' is asked in one f the interviews. Please let me know if anyone knows. Thanks

3 Answers   TCS,


how do u use sequence created in oracle in informatica? Explain with an simple example

6 Answers   CTS,


Is informatica power center designer has 64 bit support?

1 Answers  


Explain in detail scd type 2 through mapping.

0 Answers  


if i hv 6 table as source table but can i make 12 as a dim table and 6 as fact table belongs to that src table.

0 Answers   iGate,


What is operational data source (ODS)?

7 Answers  


IN SCD1, insource we have 10 billion records and in the first day its uploaded successfully and in the second day its taking time to upload because some records it might get update or insert new records. As a developer what will be the better solution for this??

0 Answers  


Categories