Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Please help write a query **Urgent** tks

Please help write a query **Urgent** tks

From: Norman Dunbar <ndunbar_at_lynxfinancialsystems.co.uk>
Date: Tue, 31 Jul 2001 08:38:46 +0100
Message-ID: <48B95088F03ED511BE5A00508BEED088242B72@tapps.leeds.lfs.co.uk>

Mike

you'll find everything you need to know here :

http://www.jlcomp.demon.co.uk/faq/duplicates.html

but basically you need to do a :

	select supposedly_unique_field,count(*)
	from table
	group by supposedly_unique_field
	having count(*) > 1;

to list all the duplicates.

Enjoy.

Norman.



Norman Dunbar		EMail:	NDunbar_at_LynxFinancialSystems.co.uk
Database/Unix administrator	Phone:	0113 289 6265
Lynx Financial Systems Ltd.	Fax:	0113 201 7265
			URL:	http://www.LynxFinancialSystems.com

------------------------------------------------------------------------

-----Original Message-----

From: OCP [mailto:mr_ocp_at_yahoo.com]
Posted At: Tuesday, July 31, 2001 10:11 AM Posted To: server
Conversation: Please help write a query **Urgent** tks Subject: Please help write a query **Urgent** tks

Hi
We have a table the contains several duplicate records however each record
is with an unique primary key, I need to write a query to see how many records are duplicate, there is a name field which has several duplicate names under separat unique id, so is there a way that I can find out how many such duplicate names exists in the table.

Please give me some ideas - this is urgent - appreciate your help Mike
mr_ocp_at_yahoo.com
--

.... Received on Tue Jul 31 2001 - 02:38:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US