テーブル A のすべての要素 m_id を取得する必要があります。m_active は = N であり、テーブル B の対応する要素はすべて v_active = N です。
m_id はテーブル B の外部キーです。
In the example below, what I am looking for is m_id=2 and and m_id=4 as both satisfy the condition of being m_active=N and have ALL v_active = N.
How do I go about that?
Thanks
Table A example:
m_id     m_active   
1           Y
2           N
3           Y
4           N
Table B example:
v_id    m_id    v_active
 1       1         N
 2       1         Y
 3       1         N
 4       2         N
 5       2         N
 6       2         N
 7       3         N
 8       3         Y
 9       3         Y
10       4         N