Delete rows and rownum
I have a case where Oracle's rownum would be great so I am looking for a MYSQL approach
The problem:
Bad records in a file of the form
unique_record key_field,grouping_field ..., Sequence_number
...
123 , 454 .... 1
124 , 454 .... 2
125, 454 .... 2
126, 454 .... 2
127, 679 .... 1
128, 679 .... 2
129, 679 .... 2
130, 897 .... 1
...
I need to delete all but one of the extra 2's so the end result is:
...
123 , 454 .... 1
124 , 454 .... 2
127, 679 .... 1
128, 679 .... 2
130, 897 .... 1
...
I am using Toad for MYSQL and want an SQL solution if possible.
Thanks,
John Putnam
Subject
Views
Written By
Posted
Delete rows and rownum
8307
November 12, 2008 12:42PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.