better delete statement to remove duplicate rows from exception table?

2003-12-11 Thread Jacques Kilchoer
In the situation below, is there a better way to write the delete statement that eliminates duplicates? (assuming duplicate rows form at most 5 % of the table rows) Notice that the exceptions table is not analyzed. If I analyze the exceptions table, is there then another better way to write

Re: better delete statement to remove duplicate rows from exception

2003-12-11 Thread Dias Costa
? (assuming duplicate rows form at most 5 % of the table rows) Notice that the exceptions table is not analyzed. If I analyze the exceptions table, is there then another better way to write it? create table my_exceptions (row_id urowid, owner varchar2 (30), table_name varchar2 (30), constraint

bcv copy - duplicate rows unique prim key

2003-11-26 Thread Jeroen van Sluisdam
Hi, When I issue an alter table move statement and afterwards an alter index rebuild for the primary key on this table I got an error duplicate rows found. This primary key is unique. The database has just been migrated for test purposes. In production we are still on oracle 7.3.4

Removing duplicate rows from a table !

2003-10-16 Thread Rama, Shreekantha (K.)
Hi, I am trying to remove the duplicate rows from a table with the column data.. I cannot use PK as it's just a sequence number... I could find all the duplicate rows by grouping the column. but how can i delete only the duplicate ones and retain the original

Re: Removing duplicate rows from a table !

2003-10-16 Thread Todd Boss
; Better way; much faster for large tables, lets you audit the duplicate rows by examining exceptions table. 3. Write a cursor; sql coding solution ... probably doesn't give you anything mroe than what option 2 provides. boss Hi, I am trying to remove the duplicate rows from a table

RE: Removing duplicate rows from a table !

2003-10-16 Thread Govind.Arumugam
Assuming that we have duplicate rows ( NOT duplicate keys ), you may try this. I have borrowed this from a friend of mine. We have used it successfully. Each of the columns in the table are included as predicates to confirm that we are deleting only the duplicate rows. delete from

RE: PL/SQL Question:Eliminate duplicate rows

2003-09-22 Thread Mercadante, Thomas F
. -- Kernighan [EMAIL PROTECTED] e.ny.us To: [EMAIL PROTECTED] Sent by: cc: [EMAIL PROTECTED]Subject: RE: PL/SQL Question:Eliminate duplicate rows

RE: PL/SQL Question:Eliminate duplicate rows

2003-09-22 Thread Johan Muller
by: cc: [EMAIL PROTECTED]Subject: RE: PL/SQL Question:Eliminate duplicate rows .com 09/19/2003 01:54 PM Please respond

PL/SQL Question:Eliminate duplicate rows

2003-09-19 Thread Johan Muller
Looking for an a sample cursor routine to load a PK enabled table to eliminate any dupes from the load table. __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- Please see the official ORACLE-L FAQ:

RE: PL/SQL Question:Eliminate duplicate rows

2003-09-19 Thread Mercadante, Thomas F
Johann, how about the following. what this does is, using the inner begin/end block, catches when an insert would fail because of the PK failure and ignores the error. This is very quick and dirty - it will work fine if you are not working with a huge amount of data. declare cursor c1 is

RE: PL/SQL Question:Eliminate duplicate rows

2003-09-19 Thread Mladen Gogala
To: Multiple recipients of list ORACLE-L Subject: PL/SQL Question:Eliminate duplicate rows Looking for an a sample cursor routine to load a PK enabled table to eliminate any dupes from the load table. __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use

RE: PL/SQL Question:Eliminate duplicate rows

2003-09-19 Thread Ron Thomas
] Sent by: cc: [EMAIL PROTECTED]Subject: RE: PL/SQL Question:Eliminate duplicate rows

RE: PL/SQL Question:Eliminate duplicate rows

2003-09-19 Thread Mercadante, Thomas F
PROTECTED] e.ny.us To: [EMAIL PROTECTED] Sent by: cc: [EMAIL PROTECTED]Subject: RE: PL/SQL Question:Eliminate duplicate rows .com 09/19/2003 01

RE: PL/SQL Question:Eliminate duplicate rows

2003-09-19 Thread Igor Neyman
Check SQL Reference for exception_clause when creating Primary Key. Could help to do what you need just using SQL (no PL/SQL). Igor Neyman, OCP DBA [EMAIL PROTECTED] -Original Message- Mercadante, Thomas F Sent: Friday, September 19, 2003 2:55 PM To: Multiple recipients of list

RE: PL/SQL Question:Eliminate duplicate rows

2003-09-19 Thread Ron Thomas
: [EMAIL PROTECTED]Subject: RE: PL/SQL Question:Eliminate duplicate rows .com

Duplicate rows

2002-02-06 Thread Alexander Ordonez
Hi gurus, I need detect and delete duplicate rows in any table, somebody helpme thanks!!! @lex Lic. Alexander Ordóñez Arroyo Caja Costarricense del Seguro Social Soporte Técnico - División de

RE: Duplicate rows

2002-02-06 Thread Mark Leith
February 2002 15:33 To: Multiple recipients of list ORACLE-L Hi gurus, I need detect and delete duplicate rows in any table, somebody helpme thanks!!! @lex Lic. Alexander Ordóñez Arroyo Caja Costarricense del Seguro Social Soporte

Re: Duplicate rows

2002-02-06 Thread Viktor
] wrote: Hi gurus, I need detect and delete duplicate rows in any table, somebody helpme thanks!!! @lex Lic. Alexander Ordóñez Arroyo Caja Costarricense del Seguro Social Soporte Técnico

RE: Duplicate rows

2002-02-06 Thread Babich , Sergey
Or to just count them: SELECT col1,col2.coln,count(*) from table Group by col1,col2...coln Having count(*) 1; -Original Message- Sent: Wednesday, February 06, 2002 10:33 AM To: Multiple recipients of list ORACLE-L Subject:Duplicate rows Hi gurus, I need detect

Re: Duplicate rows

2002-02-06 Thread Rachel Carmichael
on just one column --- Alexander Ordonez [EMAIL PROTECTED] wrote: Hi gurus, I need detect and delete duplicate rows in any table, somebody helpme thanks!!! @lex Lic. Alexander Ordóñez Arroyo Caja Costarricense del Seguro

Re: Duplicate rows

2002-02-06 Thread Stephane Faroult
Alexander Ordonez wrote: Hi gurus, I need detect and delete duplicate rows in any table, somebody helpme thanks!!! @lex Lic. Alexander Ordóñez Arroyo Caja Costarricense del Seguro Social Soporte Técnico - División de

RE: Duplicate rows

2002-02-06 Thread Alexander Ordonez
recipients of list ORACLE-L Asunto: RE: Duplicate rows Alex, Here are a couple of scripts that have come from the list in the past: === declare cursor get_dups is select pk_col1, pk_col2, pk_col3, count(*) from table group by pk_col1

Re: Duplicate rows

2002-02-06 Thread Rick_Cale
Subject: Duplicate rows Sent by: root@fatcity

RE: Duplicate rows

2002-02-06 Thread Alexander Ordonez
]; [EMAIL PROTECTED] Asunto: Re: Duplicate rows DELETE FROM table a WHERE a.rowid (SELECT MIN(b.rowid) FROM table b WHERE b.key_field1 = a.keyfield1 AND b.key_field2

Re: Duplicate rows

2002-02-06 Thread Joan Hsieh
delete from z where rowid in (select rowid from z a where a.rowid (select min(rowid) from z b where a.x = b.x)); Alexander Ordonez wrote: Hi gurus, I need detect and delete duplicate rows in any table, somebody helpme thanks!!! @lex

RE: Duplicate rows

2002-02-06 Thread Babich , Sergey
Delete from table_name where rowid not in(select min(rowid) from table_name group by col1,col2,...coln); Best, Sergey -Original Message- Sent: Wednesday, February 06, 2002 10:33 AM To: Multiple recipients of list ORACLE-L Subject:Duplicate rows Hi gurus, I need detect

RE: Duplicate rows

2002-02-06 Thread Van M. Etheridge
Title: RE: Duplicate rows Delete duplicate records Sanjay Raj 06 Dec 2001, Rating 4.42 (out of 5) Here is a short Oracle script that deletes duplicate records from a table based on the unique columns selected: Rem del_dup.sql Rem Rem Script to delete duplicate rows from a table Rem Rem

Re: Duplicate rows

2002-02-06 Thread orantdba
Hi, Probably the best way is to attempt to enable a unique constraint and use the exceptions table to find the rowid's all rows that violate the constraint. John [EMAIL PROTECTED] wrote: Hi gurus, I need detect and delete duplicate rows in any table, somebody helpme thanks!!! @lex

Re: Duplicate rows

2002-02-06 Thread Rachel Carmichael
and delete duplicate rows in any table, somebody helpme thanks!!! @lex Lic. Alexander Ordóñez Arroyo Caja Costarricense del Seguro Social Soporte Técnico - División de Informática

RE: SQL to find duplicate rows...

2001-12-07 Thread HAWKINS, JAMES W [IT/1000]
know how that goes... I need to query a table to find all duplicate rows based on a given column. Don't feel like re-inventing the wheel... Thanks in advance, Jim -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jack C. Applewhite INET: [EMAIL PROTECTED] Fat City

SQL to find duplicate rows...

2001-12-06 Thread HAWKINS, JAMES W [IT/1000]
Hello all, I know this has come across many times now, and I thought I had it saved somewhere - you know how that goes... I need to query a table to find all duplicate rows based on a given column. Don't feel like re-inventing the wheel... Thanks in advance, Jim

RE: SQL to find duplicate rows...

2001-12-06 Thread Jamadagni, Rajendra
select column1, count(*) from my_table group by column1 having count(*) 1 __ Rajendra Jamadagni MIS, ESPN Inc. Rajendra dot Jamadagni at ESPN dot com Any opinion expressed here is personal and doesn't reflect that of ESPN Inc.

RE: SQL to find duplicate rows...

2001-12-06 Thread Jack C. Applewhite
recipients of list ORACLE-L Hello all, I know this has come across many times now, and I thought I had it saved somewhere - you know how that goes... I need to query a table to find all duplicate rows based on a given column. Don't feel like re-inventing the wheel... Thanks in advance, Jim

RE: SQL to find duplicate rows...

2001-12-06 Thread Jack C. Applewhite
Hello all, I know this has come across many times now, and I thought I had it saved somewhere - you know how that goes... I need to query a table to find all duplicate rows based on a given column. Don't feel like re-inventing the wheel... Thanks in advance, Jim -- Please see the official

Duplicate rows.

2001-08-23 Thread Tatireddy, Shrinivas (MED, Keane)
hi lists can anybody tell me how to delete duplicate rows in the table. my table has 10 rows (5 sets of each 2 records) all are identical. how to delete 1 full set. I need the rows value should be distinct. I tried create table xyz as select distinct and finished the task

Re: Duplicate rows.

2001-08-23 Thread Rukmini Devi
tell me how to delete duplicate rows in the table. my table has 10 rows (5 sets of each 2 records) all are identical. how to delete 1 full set. I need the rows value should be distinct. I tried create table xyz as select distinct and finished the task. but this is a lengthy process

SQL PROBLEM for duplicate rows..

2001-05-25 Thread N. SARAVANA KUMAR
Hi Table A got some duplicated rows.. The requirement is to delete the duplicate records by maintaing one copy.. Is it manageable thru single query? or have to go for PL/SQL procedure? Pl. send me ur valuable inputs. Saravanakumar -- Please see the official ORACLE-L FAQ:

Re: SQL PROBLEM for duplicate rows..

2001-05-25 Thread Burçin Üstün Kýlýç
I think this query eliminates the duplicated rows: delete from table_name where rowid not in (select maxrowid from (select column1,column2, max(rowid) maxrowid from den group by column1,column2)); - Original Message - To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Sent:

Re: SQL PROBLEM for duplicate rows..

2001-05-25 Thread Burçin Üstün Kýlýç
I am sorry I made a mistake in naming . Correct one is below: delete from table_name where rowid not in (select maxrowid from (select column1,column2, max(rowid) maxrowid from table_name group by column1,column2)); - Original Message - To: Multiple recipients of list ORACLE-L [EMAIL

Re: SQL PROBLEM for duplicate rows..

2001-05-25 Thread N. SARAVANA KUMAR
Yes, It works .. Thanks.. On Fri, 25 May 2001, [iso-8859-1] Burçin Üstün Kýlýç wrote: I think this query eliminates the duplicated rows: delete from table_name where rowid not in (select maxrowid from (select column1,column2, max(rowid) maxrowid from den group by column1,column2));

Uniquely Weird - duplicate rows

2001-05-01 Thread Koivu, Lisa
Hello all, 8.1.6.2 on HP/UX 11.0 Has anyone seen something like this before? I can't rebuild the primary key - the error is duplicate rows found. So I check the data (first listing) and see duplicate rows via fts. When I give it a hint to use the primary key it shows nothing. When I