Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Enlist some properties of sessions.

1135


can any one give some examples for pre sql and post sql(Except dropping and creating index).

4150


What is fact table? Explain the different kinds of facts.

1125


How to generate sequence numbers?

1132


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?

1229


What is informatica powercenter repository?

1256


Is stop and abort are same in informatica?

1048


To import the flat file definition into the designer where should the flat file be placed?

1104


What are Dimensional table?

1120


Briefly define a session task?

1195


What are the different clients of powercenter?

1115


What are the transformations that are not supported in mapplet?

1084


Enlist the advantages of informatica.

1099


What are the databases that informatica can connect to windows?

1096


Explain the aggregator transformation?

1222