J
Jill
I am creating a query joining two tables. The 'memb'
table contains member names and addresses and the 'loan'
table has loan info associated with the members. A single
member/acct# could have numerous loan codes. I want my
results to be only members who DO NOT have certain loan
codes associated with them acct#. I thought a subquery
would do the job, but it leaves in the member if they
have any other loan codes.
Select distinct memb.acct
from memb, loan
where memb.rowno=loan.rowno_membloan_memb
AND ((memb.acct) Not In (select acct from memb where
loan.rowno_membloan_memb=memb.rowno And loan.code="he" or
loan.code="hc"or loan.code="1m" or loan.code="um" or
loan.code="fm"))
table contains member names and addresses and the 'loan'
table has loan info associated with the members. A single
member/acct# could have numerous loan codes. I want my
results to be only members who DO NOT have certain loan
codes associated with them acct#. I thought a subquery
would do the job, but it leaves in the member if they
have any other loan codes.
Select distinct memb.acct
from memb, loan
where memb.rowno=loan.rowno_membloan_memb
AND ((memb.acct) Not In (select acct from memb where
loan.rowno_membloan_memb=memb.rowno And loan.code="he" or
loan.code="hc"or loan.code="1m" or loan.code="um" or
loan.code="fm"))