RE: how to find duplicate copy...

RE: how to find duplicate copy...

 

  

Hi,

select col1, col2, col3, rowid from table1 a
where rowid > (select min (rowid) from table1 b
where b.col1 = a.col1
and b.col2 = a.col2
and b.col3 = a.col3)
Order by col1, col2, col3;

will give you just the duplicate ones i.e. leave out 1st record and return
the other ones found to be duplicate, so can be used to delete the duplicate
ones using rowid.

regards,
./shruti

-----Original Message-----
From: Islam Farhadul
[mailto:oracledba-ezmlmshield-x95928960.[Email address protected]
Sent: Tuesday, August 17, 2004 10:28 PM
To: LazyDBA Discussion
Subject: RE: how to find duplicate copy...



Hi all,

I have a table with multiple records of a same entity. How would I find
the duplicate copies of data of same entity?


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html



Oracle LazyDBA home page