Join to find Duplicates

2007-10-16 Thread Chris W
I need to find records in a table that may be duplicate records. The table stores basic information about the Users. I want to do a match on the FName and LName fields. The query I have looks like this SELECT u1.UserID, u1.FName, u1.LName, u1.Email, COUNT(u1.Email) AS `Count` FROM user u

Re: find duplicates - revisted

2005-04-20 Thread doug
Yes - thanks. I did not define the data with keys because it does not come out of the source that way. Keys and replace does it nicely. Probably my question defined me as a newbie, if not well... Thank you very much for you help. On Wed, 20 Apr 2005, Duncan Hill wrote: > On Wednesday 20 April 2

Re: find duplicates - revisted

2005-04-20 Thread Duncan Hill
On Wednesday 20 April 2005 16:55, [EMAIL PROTECTED] typed: > For the small number of records, this query takes a remarkable amount of > time, so clearly this solution does not scale. A query that uses keys should not take a long time to run - unless your key data is not maintained as a key in the

find duplicates - revisted

2005-04-20 Thread doug
I have read the MySQL Cookbook and the last 6 months (or so) of threads on this. I have a slightly different problem. I use a billing system implemented in filemaker. Happily they are going a rewrite in MySQL/PHP, but for the present I maintain a MySQL database so I can track things otherwise not a

Re: find duplicates

2004-01-13 Thread doug
ouch To Jimmy and Chris and the list in general. This list is particualiarly kind to question of this nature. I for one appricate it. In this case it is amazing how many wrong things I came up with. On Tue, 13 Jan 2004, Chris Elsworth wrote: > On Tue, Jan 13, 2004 at 02:03:26AM -0500, [EMAIL

Re: find duplicates

2004-01-13 Thread Chris Elsworth
On Tue, Jan 13, 2004 at 02:03:26AM -0500, [EMAIL PROTECTED] wrote: > > select prodid,count(groupid) as cnt from products > where (groupid=65 or groupid=66) > group by imgsml having cnt>1; > > I.e. replacing order by with a having clause. After trying many variations; are > 'order by' and 'hav

find duplicates

2004-01-13 Thread doug
The db in question is a shopping cart and I was looking for products I added that might have been duplicated in another category. My first attempt that worked. select prodid,count(groupid) as cnt from products where (groupid=65 or groupid=66) group by imgsml order by cnt; The thing wrong with

Re[2]: Find duplicates query

2003-12-09 Thread DeBug
select ID from YourTable group by ID having count(ID) > 1 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Find duplicates query

2003-12-08 Thread Andrew Braithwaite
You should get a nice list of duplicates ordered by how many dupes there are.. Cheers, A -Original Message- From: Jeff McKeon [mailto:[EMAIL PROTECTED] Sent: Monday 08 December 2003 14:20 To: [EMAIL PROTECTED] Subject: Find duplicates query I'm trying to search a table for duplicate

Find duplicates query

2003-12-08 Thread Jeff McKeon
I'm trying to search a table for duplicate entries. A record is a dup if fields Fee, Fie, Foe are equal in two records. Would this query be correct to search the table for duplicates? Select Fee,Fie,Foe >From TableFoo Group by Fee,Fie,Foe Having Count(*) > 1; Thanks, Jeff -- MySQL General Mail