Deletings Rows based on Field Values

R

Ramesh

Hi I got a table with 4 fields.There are some duplicate rows.I need to keep
one row and delete the rest.

Table is like this

feild1 field2 field3 fieLd4
A B 1 NULL
A B 1 a
C D 1 b
C D 1 b
E F 2 NULL
E F 2 NULL

I need to delete rows based on value in field 4.

From the 1 and 2 rows above,I need to keep row,*where the field4 is
populated for one row.

From the 3 and 4 rows above,I need to keep one row and delete the
other,*where the filed4 is populated for both rows.

From the 5 and 6 rows above,I need to keep one row and delete the
other,*where the filed4 is not populated for both rows.


Can anyone help me in this.

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top