Re: SQL statement to find and delete double entries

2003-09-23 Thread Ian Harisay
uot;Tim Bunce" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, September 22, 2003 6:36 PM Subject: Re: SQL statement to find and delete double entries Thanks, Tim. Adding Oracle to your search yielded the following quickly. delete from T t1 where t1.rowid >

Re: SQL statement to find and delete double entries

2003-09-23 Thread Jeffrey . Seger
EMAIL PROTECTED] "Christian Merz" <[EMAIL PROTECTED]> 09/23/2003 09:49 AM To: Jeffrey Seger/Corporate/[EMAIL PROTECTED] cc: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> Subject: Re: SQL statement

Re: SQL statement to find and delete double entries

2003-09-23 Thread Christian Merz
r data model ... cu, Christian - Original Message - From: <[EMAIL PROTECTED]> To: "Tim Bunce" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, September 22, 2003 6:36 PM Subject: Re: SQL statement to find and delete double entries > Thanks, Tim. Addin

Re: SQL statement to find and delete double entries

2003-09-22 Thread Jeffrey . Seger
ED], "Morrison, Trevor (Trevor)" <[EMAIL PROTECTED]> Subject: Re: SQL statement to find and delete double entries It's a common problem. You can start here: http://www.google.com/search?as_q=sql+delete+duplicate and add the name of the databa

Re: SQL statement to find and delete double entries

2003-09-22 Thread Chuck Fox
Avis, The use of a unique clustered index is an interesting solution, however, it requires 1.2 times the space currently consumed by the table and rewrites the table. IMHO, unless we are talking a major duplication i.e. 90% dupes, creating the clustered index will be slower. Chuck [EMAIL PR

RE: SQL statement to find and delete double entries

2003-09-22 Thread Avis, Ed
If you are using Sybase, you can delete duplicate rows from a table by creating a unique clustered index 'with ignore_dup_row' (and then dropping it again if you don't want to ignore later duplicate inserts). I haven't benchmarked but I think this will be somewhat faster than a stored procedure.

RE: SQL statement to find and delete double entries

2003-09-22 Thread gavin . hale
Cc: Christian Merz; [EMAIL PROTECTED]; Morrison, Trevor (Trevor) Subject: Re: SQL statement to find and delete double entries Jeff, Here is the syntax for doing this in Sybase as a stored procedure. Assumption: id is an int. CREATE PROCEDURE del_dupes AS BEGIN DECLARE @id int, @id_count int

Re: SQL statement to find and delete double entries

2003-09-22 Thread Chuck Fox
PROTECTED]> 09/18/2003 08:33 AM To: "Morrison, Trevor (Trevor)" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> cc: Subject:Re: SQL statement to find and delete double entries Hi, the basic idea to find duplicate or multiple values is: select id, count

Re: SQL statement to find and delete double entries

2003-09-19 Thread Tim Bunce
33 AM > > > To: "Morrison, Trevor (Trevor)" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> > cc: > Subject:Re: SQL statement to find and delete double entries > > > Hi, > > the basic idea to find duplicate or multiple

Re: SQL statement to find and delete double entries

2003-09-19 Thread Jeffrey . Seger
revor)" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> cc: Subject:Re: SQL statement to find and delete double entries Hi, the basic idea to find duplicate or multiple values is: select id, count(*) from table group by id having count(*) > 1;

Re: SQL statement to find and delete double entries

2003-09-18 Thread Christian Merz
Hi, the basic idea to find duplicate or multiple values is: select id, count(*) from table group by id having count(*) > 1; to delete ALL such values you may do this: delete from table where id in ( select id from table group by id having count(*)

Re: SQL statement to find and delete double entries

2003-08-16 Thread M. Addlework
--- "Morrison, Trevor (Trevor)" <[EMAIL PROTECTED]> wrote: > What would be an SQL statement that will find duplicate order numbers in > table and then delete them? Try a google statement, like "sql delete duplicate rows" __ Do you Yahoo!? Yahoo! SiteBuilder - Fre