Results 1 to 2 of 2
  1. #1
    Coryjacques is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2018
    Posts
    16

    Adding a record with a blank value in JOIN

    Hello,

    I have three tables: Company, Personal, and Personal1. Personal1 is only used to add an email address for supervisors listed in Company, hence the left joins below. I run a report weekly to upload into one of our systems, and I realized that our CEO has been left out since he has no supervisor in our HRIS. I can't add a value to company.Supervisorname for him, or another record to personal1, because of how delicate the upload system is. Below is my query - do you have any tips for adding his record as well?

    Code:
    SELECT '[my company's name]' AS company_name, personal.emailaddress AS user_login, personal.eename AS user_name, personal1.emailaddress AS manager_login, company.jobtitle AS user_title, company.orglevel2 AS user_department, company.location, personal.lasthiredate AS hire_date, personal.employeenumber AS external_uuidFROM (personal 
    INNER JOIN Company 
    ON personal.employeenumber = company.employeenumber) 
    LEFT JOIN Personal1 ON company.supervisorname = personal1.eename
    WHERE personal.employmentstatuscode = 'A'


  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    you cannot join a null field.
    make Q1 query without nulls,
    then Q2 using Q1 can join.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 03-29-2017, 11:22 AM
  2. Replies: 17
    Last Post: 08-27-2013, 10:21 PM
  3. Replies: 4
    Last Post: 01-24-2013, 12:11 AM
  4. Replies: 7
    Last Post: 09-06-2012, 06:04 AM
  5. adding new blank record help needed
    By Mile129 in forum Forms
    Replies: 2
    Last Post: 09-22-2010, 08:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums