db2 - use sql to delete a person from a list with a conflicting field -


hi have table asks person yes/no answer, have said both yes , no i.e.:

person--------------status 1-------------------yes 2-------------------yes 3-------------------yes 3-------------------no 4-------------------no 5-------------------yes 5-------------------no 

where persons 3 , 5 have 2 rows, 1 'yes' , 1 'no'.

what want find people both answers, , delete row line says 'no'. end with:

person--------------status 1-------------------yes 2-------------------yes 3-------------------yes 4-------------------no 5-------------------yes 

my logic failing me , can get:

delete table status = 'no' , person in (select person table status = 'yes') 

but of course deletes both types.

anyone have suggestions?

the expression and where not sql. try this:

delete table      status = 'no' ,            person in (select person table status = 'yes') 

the logic looks correct me.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -