Check for duplicates (and case-sensitivity)
| From: | Murph | Date: | Thu, 30 Nov 2000 02:43:31 +0000 |
| Subject: | Check for duplicates (and case-sensitivity) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27956@lists.php.net to get a copy of this message | ||
> To find if you have duplicate entries, you can do something like:
>
> select EMAIL_ADDRESS, count(*) from CONTACTS group by EMAIL_ADDRESS having
> count(*) > 1
Thanks, Samantha! Scott Gerhardt had the same solution. Chris Lee cleaned up
my code quite nicely. All of you good folks are to be commended for your
skill and willingness to share. Thank you very much.
I'm now faced with case-sensitivity. The above won't catch potential
duplicates as murph@aol.com and murph@AOL.COM. I think I need some sort of
strtoupper(EMAIL_ADDRESS) in there but that solution doesn't quite work.
Can anyone help out here?
Yours,
Murph