RE: Check for duplicates (and case-sensitivity)
| From: | Samantha Savvakis | Date: | Thu, 30 Nov 2000 03:14:19 +0000 |
| Subject: | RE: Check for duplicates (and case-sensitivity) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27962@lists.php.net to get a copy of this message | ||
HI Murph,
try:
SELECT UPPER(EMAIL_ADDRESS), COUNT(*) from CONTACTS group by EMAIL_ADDRESS
having count(*) > 1
> -----Original Message-----
> From: Murph [mailto:murph@murphatnight.com]
> Sent: Thursday, 30 November 2000 12:44
> To: samantha@cfs.net.au; php-general@lists.php.net
> Subject: Check for duplicates (and case-sensitivity)
>
>
> > 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
>