Access 2003 SQL sub-query within query

15 pts.
Tags:
Microsoft Access 2003
SQL Sub-query
I’m trying to extract all Person.ID eligible to sit a Level 1 study exam from our database. So I setup a query to look for members with study exam level 1 not equal to “pass” or Is Null, thinking it would give me all people who hadn’t sat or hadn’t passed level one exam. However where it doesn’t work is where a person has sat and failed and then later sat and passed. Because the query looks at it on a record by record basis any person who failed is picked up regardless if they then passed at a later time. I think what I need is to somehow look at all study exam records for a person and if there they have no level 1 pass in any of their study records then include them in the list.

Software/Hardware used:
Access 2003
ASKED: May 2, 2012  1:16 AM
UPDATED: October 21, 2013  6:41 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    So far it sounds like you're on a good path. Please show the query that you have developed. It can probably be changed to help get you closer. Tom
    125,585 pointsBadges:
    report
  • JimiLotus
    Thanks TomLiotta Here's the query. SELECT Trans_Person.FirstName, Trans_Person.LastName, Trans_Person.Phone_Mobile, Trans_Study.ExamPass, Trans_Study.ExamLevelID FROM Trans_Person LEFT JOIN Trans_Study ON Trans_Person.ID = Trans_Study.PersonID WHERE (((Trans_Study.ExamPass)<>"pass" Or (Trans_Study.ExamPass) Is Null) AND ((Trans_Study.ExamLevelID)=1 Or (Trans_Study.ExamLevelID) Is Null));
    15 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following