Use a direct dbms with a select, group by and having clause

Select staff_id, course_id from someTable group by staff_id, course_id
having count (*) > 1

Think of the having clause as a where on the results of a group by.


Troy

-----Original Message-----
From: Dan Stein [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 02, 2003 2:19 PM
To: [EMAIL PROTECTED]
Subject: Witango-Talk: Find duplicates


Looking for an easy way to bring back a list of duplicate course ID's for a
given staff_ID in a table based on a search action along if possible

SQL 2000
--
Dan Stein
Digital Software Solutions
799 Evergreen Circle
Telford PA 18969
Land: 215-799-0192
Mobile: 610-256-2843
Fax 413-410-9682
FMP, WiTango, EDI,SQL 2000
[EMAIL PROTECTED]
www.dss-db.com


________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

Reply via email to