Select A.serialnumber from table1 as A, table1 as B
Where A.serialnumber = B.serialnumber and A.Id <> b.Id
Order by serialnumber, Id

 
Matthew Small
Web Developer
American City Business Journals
704-973-1045
[EMAIL PROTECTED]
 

-----Original Message-----
From: Orlini, Robert [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 23, 2005 2:22 PM
To: CF-Talk
Subject: find identical records

I know this one must be easy, but I'm not a guru w/SQL yet.

How do I construct an SQL query that will list all records that have an
identical field?

For example, listing all records that contain an identical number in the
serialnumber column.

I did:

Select distinct serialnumber from inventory
order by serialnumber asc

to get the unique records.

Robert O.

-- 
Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.1/104 - Release Date: 9/16/2005
 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219125
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to