An applicant with a number of applications

T

Tony

i have 2 tables

An applicant (table A) has a number of applications (Table B).

i wish to sort out the applicant
if
when ALL the applications are "paid" or/and "rejected"

How should the logic go?

Thank you for your assistance.

Tony
 
J

John Spencer (MVP)

The following __should__ return a result with updatable rows.

SELECT ApplicantID
FROM Applicants
WHERE NOT Exists
(SELECT ApplicantID
FROM Applications
WHERE SomeField Not In ("Paid","Rejected")

Michel Walsh's method while very sound, will not return an updatable set of
rows.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top