Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Duplicate ids
Message
From
29/06/2001 10:20:30
 
 
To
28/06/2001 08:34:38
Christian Cote
Les Logiciels Onoma Inc.
Longueuil, Quebec, Canada
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Miscellaneous
Thread ID:
00524612
Message ID:
00525183
Views:
22
You can use SQL Plus:

Option 1) The simplest and most elegant Method

CREATE TABLE table_without_duplicates AS
SELECT DISTINCT *
FROM table_with_duplicates ;
COMMIT;

DROP TABLE table_with_duplicates ;
COMMIT;
RENAME TABLE table_without_duplicates table_with_duplicates;

Option 2) An Oracle-specific Method
For Oracle, this solution utilizes the unique rowid of each row in a table,
and removes all duplicate rows in a table:

DELETE FROM my_table t
WHERE EXISTS (
SELECT *
FROM my_table tt
WHERE t.rowid > tt.rowid
AND other criteria)

The rowid > part makes sure you take the first of the rows in the duplicate set...

HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform