Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Selecting multiple descriptions

Author  Topic 

gemispence
Yak Posting Veteran

71 Posts

Posted - 2006-02-28 : 16:27:36
I want to select multiple records based on descriptions that are the same. Descriptions is my column and I really want to find duplicate records based on the description column.

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-02-28 : 16:53:22
sample data / expected output?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-02-28 : 17:00:52
Here's an example of how to find duplicates:


select au_lname, au_fname, city, state, count(*)
from dup_authors
group by au_lname, au_fname, city, state
having count(*) > 1
order by count(*) desc, au_lname, au_fname


Tara Kizer
aka tduggan
Go to Top of Page
   

- Advertisement -