Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

delete duplicate rows

450389Nov 1 2006 — edited Nov 1 2006
Hello,

I have a table, table1 that has 10 columns of which one is a serial number and another is DOB. For some rows in the table there are duplicate serial numbers. There should be no serial number duplicates.
for example:

123456 11/01/75
123456 NULL

so when do a select distinct it shows both the records because of the missing DOB.

How can I delete the record that does not have the DOB?

Another issue with this table is that it holds history information of clients. So for any given client I have 4 diffrent address information rows. I need to delete the 3 old rows and retain only the latest address info. This data is also in another table table2 that has the date that there was the address change. So I will need to pick up the latest address from table2 and delete the rest from table1.

How can I delete the old address information?

any help is very much appreciated.
Thank you.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 29 2006
Added on Nov 1 2006
5 comments
1,139 views