Re: Case confusion

2006-05-09 Thread Peter Brawley
Marcus, I just noticed that a key field (emailaddress) in my db is case sensitive when it should not have been, so now I've got a bunch of what are effectively duplicate records. I'm having trouble picking them out so I can manually merge/delete them before changing the collation on the field

Re: Re: Case confusion

2006-05-09 Thread 彭一凡
t: Tuesday, May 09, 2006 8:12 PM Subject: Re: Case confusion > On 9 May 2006, at 02:22, Chris wrote: > >> I would run this query: >> >> SELECT >>* >> FROM mytable >> WHERE LOWER(emailaddress) IN >>(SELECT >>LOWER(emailaddress) >

Re: Case confusion

2006-05-09 Thread Marcus Bointon
On 9 May 2006, at 13:12, Marcus Bointon wrote: I'm giving it a go, but it's been running for about 4 hours at 60% CPU so far! Would it be quicker to tell it to use a case insensitive collation to locate the duplicates? I managed to come up with a variation on my original attempt that got

Re: Case confusion

2006-05-09 Thread Marcus Bointon
On 9 May 2006, at 02:22, Chris wrote: I would run this query: SELECT * FROM mytable WHERE LOWER(emailaddress) IN (SELECT LOWER(emailaddress) FROM mytable GROUP BY 1 HAVING COUNT(emailaddress) > 1) This would show all duplicate emails, I would use the info this displays to c

Re: Case confusion

2006-05-08 Thread Chris
I would run this query: SELECT * FROM mytable WHERE LOWER(emailaddress) IN (SELECT LOWER(emailaddress) FROM mytable GROUP BY 1 HAVING COUNT(emailaddress) > 1) This would show all duplicate emails, I would use the info this displays to choose which records to change/keep/dele

Case confusion

2006-05-08 Thread Marcus Bointon
I just noticed that a key field (emailaddress) in my db is case sensitive when it should not have been, so now I've got a bunch of what are effectively duplicate records. I'm having trouble picking them out so I can manually merge/delete them before changing the collation on the field to be