[thelist] Finding NON-unique values in MS SQL
Joel Canfield
joel at spinhead.com
Wed Jul 3 17:12:02 CDT 2002
> >I'm trying to come up with a query which would simply list
> all entries
> >which appear in any particular column more than once. I'm
> stumped. It
> >should be simple, I thought.
>
> Select ID From TableName WHERE
> ID in (Select IDF from TableName)
>
> Select ID From TableName WHERE
> ID in (Select IDT from TableName)
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.
Or perhaps I'm misunderstanding you; wouldn't be the first time.
joel
More information about the thelist
mailing list