sql - Only return the values that never occur in subquery -


i've been stuck on 3 hours now. i'm sorry having ask here, can't through it.

i've got table 2 columns. column called "process" , column b called "done". if there case process isn't done (thus having "0" value in b column) don't want have return @ all.

the subquery tried use this:

select  table not in (select table b = 0); 

still, gives me values don't want. don't understand why not work. want processes return have values of 1 in b column.

it's not clear why won't work you:

select table b = 1 

if have multiple rows same value , want ensure all of them have b set done:

select table group having min(b) = 1 select table group having count(*) = count(case when b = 1 1 end) select table group having count(*) = sum(b) /* might not work */ 

the problem think last queries equivalent 1 you've got.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -