How can I find records in a table that are missing data?

Hi, I'm looking for the simplest way to return which unique x values have no r = 'Y' records in the sample table below...   (ie: the result returned should be 'b' and 'c')

thanks!

x   r
-----
a   Y
a   N
b   N
b   N
c   N
d   Y
e   Y
e   N
expert608Asked:
Who is Participating?
 
jerryb30Commented:
OK, try this:
SELECT X
FROM YOURTABLE
GROUP by X
HAVING (((Max([r])<>"y")=True))
0
 
jerryb30Commented:
Select x from yourtable where max(r) <>"Y" group by x
0
 
expert608Author Commented:
thanks for the quick responses!   Second solution works without the "=True" part...

SELECT x FROM yourtable
GROUP by x
HAVING (((max([r])<>'Y')))
0
 
jerryb30Commented:
Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.