An applicant with a number of applications

  • Thread starter Thread starter Tony
  • Start date Start date
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
 
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.
 
Back
Top