[thelist] Finding NON-unique values in MS SQL

Anthony Baratta Anthony at Baratta.com
Wed Jul 3 17:20:01 CDT 2002

At 03:10 PM 7/3/2002, Joel Canfield wrote:

>Wouldn't that just tell me if ID appeared in one of the other columns? I
>need to know if any values are repeated in the IDF column, then I need to
>know if any values are repeated in the IDT column.

If you are just interested in "repeats" in a single column this should work...

select Count(IDF), IDF from TableName
    where Count(IDF) > 1
    group by IDF

Anthony Baratta
Keyboard Jockeys

"Conformity is the refuge of the unimaginative."

More information about the thelist mailing list