Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8993043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:06:21+00:00 2026-06-15T23:06:21+00:00

I am trying to create a query that lists records from table 1 along

  • 0

I am trying to create a query that lists records from table 1 along with a status based on corresponding records in table 2 that have null values in one or more of the fields. The problem I am running into is how to include records from table 1 which have no corresponding record in table 2.

In my example, I want to list the names of all students in tblStudent along with a field indicating the status of their schedule in tblStudentSchedule. If either course or teacher field in tblStudentSchedule is Null or no corresponding record in tblStudentSchedule is found then I want to display “Incomplete”. Otherwise, I want to display “Complete”.

desired result

Name  | Schedule Status
-----------------------
Bob   | Incomplete     
Sally | Incomplete
Jane  | Incomplete
Matt  | Incomplete
Jim   | Complete

I’m working in Access. I would post my query attempts but I think they would just confuse the issue. This is probably very basic but I am having a mental block trying to wrap my brain around this one.

tblStudent

studentID | studentName
-----------------------
1         | Bob
2         | Sally
3         | Jane
4         | Matt
5         | Jim

tblStudentSchedule

studentID | period | course | teacher
-------------------------------------
1         | 1      | math   | Jones
1         | 2      | <null> | Watson
2         | 1      | reading| <null>
4         | 1      | <null> | Crick
5         | 1      | math   | Jones
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:06:22+00:00Added an answer on June 15, 2026 at 11:06 pm
    select  s.studentName as Name
    ,       iif(sum(iif(ss.course is null or ss.teacher is null, 1, 0)) = 0,
                'Complete', 'Incomplete')
            as [Schedule Status]
    from    tblStudent s
    left join    
            tblStudentSchedule ss
    on      ss.studentID = s.studentID
    group by
            s.studentName 
    

    A left join returns a single row with null when a match is not found. So the check on ss.course is null will also trigger when the student is absent from the schedule table.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a created_at query range that will capture all records created
We are trying to create/query information from a CF based on the following structure
I trying to create a MySql Query from the $_POST values trouble is i
I'm trying to request any records from a table that appear on or after
I'm trying to create a SQL 2005 query to retrieve and combine records from
hi i am trying to make a query that will run records from a
I am trying to delete multiple records from TABLE A that exits in list
I'm trying to create a Linq query for EF that joins on 2 values
I'm trying to create a query object that contains information from 3 different entities.
I've been trying now for some time to create a query that would count

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.