Re: Removing duplicate records - OT

2001-08-14 Thread Ronald J Kimball
On Tue, Aug 14, 2001 at 11:12:23AM +1000, Neil Lunn wrote: > Use something like this as the record source for items with duplicate email > addresses: > > select * > from table > where email in ( > select email > from table > group by email > having count(*) > 1) > > and delete every sec

RE: Removing duplicate records - OT

2001-08-14 Thread Neil Lunn
>-Original Message- >From: Bart Lateur [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, August 14, 2001 8:30 PM >To: [EMAIL PROTECTED] >Subject: Re: Removing duplicate records - OT > > >On Tue, 14 Aug 2001 11:12:23 +1000, Neil Lunn wrote: > >>Use something l

Re: Removing duplicate records - OT

2001-08-14 Thread Bart Lateur
On Tue, 14 Aug 2001 11:12:23 +1000, Neil Lunn wrote: >Use something like this as the record source for items with duplicate email >addresses: > >select * >from table >where email in ( > select email > from table > group by email > having count(*) > 1) > >and delete every second record. Next

RE: Removing duplicate records - OT

2001-08-13 Thread Neil Lunn
ord. >-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] >Sent: Sunday, August 12, 2001 10:49 PM >To: [EMAIL PROTECTED] >Subject: Removing duplicate records - OT > > >Hello all, > >Sorry about the off-topic question, but this has been driving >m

Re: Removing duplicate records - OT

2001-08-13 Thread Hardy Merrill
Build a hash where the key is the email address, and the value is the whole record: my %email_hash = (); while () { ### use "unpack" or "split" to get fields from line ### if (! exists($email_hash{$email})) { $email_hash{$email} = $_; } } You would end up with a hash containing on