Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Finding Duplicates regardless of case
Wed, Apr 12 2006 7:35 AMPermanent Link

"Bern Rudisill"
I am using the following query to find duplicates

SELECT loginid,COUNT(*)
FROM user_security
GROUP BY loginid
HAVING COUNT(*) > 1

This works great to find duplicates of the same case, but how can I use
it to find dups no matter what the case?

ex. If I have the following logins in my table the above query will
report dups from rec 1 and 5, but I need it to report dups from rec
1,2,3 and 5

1 test
2 Test
3 TeSt
4 test1
5 test

Bern

--
Wed, Apr 12 2006 11:52 AMPermanent Link

"John Hay"
Bern
> I am using the following query to find duplicates
>
> SELECT loginid,COUNT(*)
> FROM user_security
> GROUP BY loginid
> HAVING COUNT(*) > 1
>
> This works great to find duplicates of the same case, but how can I use
> it to find dups no matter what the case?

How about

SELECT UPPER(loginid) AS login,COUNT(*)
FROM user_security
GROUP BY login
HAVING COUNT(*) > 1

John

Wed, Apr 12 2006 12:14 PMPermanent Link

"Bern Rudisill"
John Hay wrote:

> SELECT UPPER(loginid) AS login,COUNT(*)
> FROM user_security
> GROUP BY login
> HAVING COUNT(*) > 1

Thanks works like a charm. Never thought about that.
Bern

--
Image