Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2009
    Posts
    5

    Unanswered: Find record with missing primary key

    Bear with me please, I have a general knowledge about Access but am not a wiz.

    I have created an access database for my new company that will import employees' timesheets from excel with associated employee numbers, hours worked, job number worked on, and date worked called "Time-2009". Other tables I have are "JobList" (Job number is the primary key, also includes client and job name), "Employee" (Employee number is primary key, also includes employee name and status).

    When I run a querry to list all the time being billed out, everything is the way I want it. Except this: if for some reason an employee billed time to a job number that is not in the "JobList" table, that particular record will not show up in the querry. Obviously, since the primary key does not match what is there, there's nothing to show.

    I need to find a way to compare my table with employees' billed time, mainly the job numbers, and the "JobList" table to find any missing entries in the "JobList" table. For instance, in the attached file, job number "115-1" is not in the "JobList" table however it is being billed time in the "Time-2009" table. When you look at the "All Time" querry, that record is not there.

    Is that clear? Thanks for any help.
    Attached Files Attached Files
    Last edited by tow450; 01-23-09 at 10:11.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    sounds like you might want to use a LEFT OUTER JOIN



    by the way...

    bear with me = have patience

    bare with me = get undressed together

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    bear with me can also mean there is a grizzly at my location ^^
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Jan 2009
    Posts
    5
    by the way...

    bear with me = have patience

    bare with me = get undressed together
    Why can't it be both?

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Bare bear with me here...
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  6. #6
    Join Date
    Jan 2009
    Posts
    5
    There, I changed it. Tired of being harassed That's what I get for typing too quickly and not previewing. I'm usually the one making fun of other's grammar.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •