RE: Find duplicate rows

RE: Find duplicate rows

 

  

SELECT fld1,fld2,fld3
FROM <table>
GROUP BY fld1,fld2,fld3
HAVING COUNT(*) > 1;

This query should have been

SELECT fld1,fld2,fld3, COUNT(*)
FROM <table>
GROUP BY fld1,fld2,fld3
HAVING COUNT(*) > 1;

Ram Srinivasan
PRA International, Inc.
4105 Lewis & Clark Drive
Charlottesville, VA 22911-5801
Tel: (434) 951-3365
Web: www.praintl.com


-----Original Message-----
From: [Email Address Removed] [mailto:[Email Address Removed] Thursday, February 28, 2002 10:22 AM
To: LazyDBA.com Discussion
Subject: Re: Find duplicate rows



One more time, Assume fld1,fld2,fld3 constitute a unique record

SELECT fld1,fld2,fld3
FROM <table>
GROUP BY fld1,fld2,fld3
HAVING COUNT(*) > 1;

Other ways but this will work

Rick





"wei"

<[Email Address Removed] To: "LazyDBA.com Discussion"
<[Email Address Removed]
mail.com> cc:

Subject: Find duplicate rows

02/28/2002

01:20 PM









Hi all,

I am sure this question has been asked many times but I don't seems to find
it from archive, here goes again. How do find all the duplicate rows in a
table?
thanks,

WZ




--------
Oracle documentation is here:
http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
To unsubscribe: send a blank email to oracledba-[Email Address Removed] subscribe: send a blank email to oracledba-[Email Address Removed] the list archive: http://www.LAZYDBA.com/odbareadmail.pl
Tell yer mates about http://www.farAwayJobs.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page