RE: duplicate records check

2003-07-09 Thread Kalis, Frank
Title: RE: duplicate records check Hi Neil, try something like this SELECT your_field FROM your_table GROUP BY your_field HAVING COUNT(*) 1 Mit freundlichen Grssen Frank Kalis Asset Management ProACTIV___ CiV Versicherungen * PB Versicherungen

Re: duplicate records check

2003-07-09 Thread Nils Valentin
Hi Neil, 1) You could ask for the count of each listed item in a column. something like: SELECT item, count(item) from parts GROUP BY item; 2) you could then use SELECT id,item from parts WHERE item = 'xxx'; to review the double entries. This is just a general sample, perhaps if you give

RE: Duplicate records

2003-06-06 Thread John Griffin
Hello Steve, Do a select on the record before you insert it. If the record does not exist in the database (i.e. mysql_num_rows () == 0) than it is safe to do the insert. John -Original Message- From: Steve Marquez [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 3:41 PM To: MySQL

RE: Duplicate records

2003-06-06 Thread Mike Hillyer
You can always catch the Duplicate Key error and respond accordingly in your PHP script. Regards, Mike Hillyer www.vbmysql.com -Original Message- From: Steve Marquez [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 1:41 PM To: MySQL List Cc: PHP eMail List Subject: Duplicate

Re: Duplicate records

2003-06-06 Thread Peter Brawley
Insert. PB - - Original Message - From: John Griffin To: Steve Marquez ; MySQL List Cc: PHP eMail List Sent: Friday, June 06, 2003 2:51 PM Subject: RE: Duplicate records Hello Steve, Do a select on the record before you insert it. If the record does not exist

RE: Duplicate Records

2002-02-13 Thread Rick Emery
A quick method is to create a new table: CREATE TABLE newtable SELECT DISTINCT * FROM oldtable; note; manually verify newtable has your data. Then proceed: DROP TABLE oldtable; CREATE TABLE oldtable SELECT * FROM newtable; DROP TABLE newtable; -Original Message- From: Rich

Re: Duplicate Records

2002-02-13 Thread rc
any reason not to select distinct into a tmp table? On Sun, 10 Feb 2002, DL Neil wrote: Rich, How does one go about removing one of two identical records in a MySQL database? My mistake in an earlier database was not applying a unique number to each record (1, 2, 3, ---). I know it's

Re: Duplicate Records

2002-02-12 Thread DL Neil
Rich, How does one go about removing one of two identical records in a MySQL database? My mistake in an earlier database was not applying a unique number to each record (1, 2, 3, ---). I know it's possible to use the DISTINCT operator to show only one of the identical records in a result,

Re: Duplicate Records

2002-02-12 Thread Fournier Jocelyn [Presence-PC]
Hi, You can try to use ALTER IGNORE TABLE syntax : ALTER IGNORE TABLE your_table ADD UNIQUE(Id); Regards, Jocelyn Fournier - Original Message - From: Rich [EMAIL PROTECTED] To: MySql [EMAIL PROTECTED] Sent: Sunday, February 10, 2002 5:31 PM Subject: Duplicate Records How does one

Re: Duplicate Records

2002-02-12 Thread DL Neil
Dan, [I've cc-ed this to the list and to Rich - who asked the original question] You can do the following to remove duplicates: - create table foo as select distinct cols from table_name_containing_duplicates; - drop table_name_containing_duplicates; - alter table foo rename to

Re: Duplicate Records

2002-02-10 Thread DL Neil
Rich, How does one go about removing one of two identical records in a MySQL database? My mistake in an earlier database was not applying a unique number to each record (1, 2, 3, ---). I know it's possible to use the DISTINCT operator to show only one of the identical records in a result,

Re: Duplicate Records

2002-02-10 Thread Fournier Jocelyn [Presence-PC]
Hi, You can try to use ALTER IGNORE TABLE syntax : ALTER IGNORE TABLE your_table ADD UNIQUE(Id); Regards, Jocelyn Fournier - Original Message - From: Rich [EMAIL PROTECTED] To: MySql [EMAIL PROTECTED] Sent: Sunday, February 10, 2002 5:31 PM Subject: Duplicate Records How does one

RE: Duplicate Records

2002-02-10 Thread Daniel Rosher
!! -- this will avoid duplicates. Regards, Dan -Original Message- From: DL Neil [mailto:[EMAIL PROTECTED]] Sent: Monday, 11 February 2002 8:30 a.m. To: Rich; MySql Subject: Re: Duplicate Records Rich, How does one go about removing one of two identical records in a MySQL database? My mistake