+ Reply to Thread
Results 1 to 6 of 6

Access Query NOT EQUAL Join

  1. #1
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    Access Query NOT EQUAL Join

    I'm not nearly as well versed in Access as Excel and have a question about creating a query with two tables with a "Not Equal" to commonality join.

    From table 1 (SBU Output), I want to bring in all of the employees in field (Employee Id) where the employee Id field does NOT match up with Table 2 (SBU Employee List) field (SBU Employee Id)

  2. #2
    Registered User
    Join Date
    08-01-2012
    Location
    Los Angeles, CA USA
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Access Query NOT EQUAL Join

    The best thing to do with this is to manually write the query. Similar to SQL.

    The syntax will be similar to this:

    Please Login or Register  to view this content.
    Hope that helps.

    You can also create the query and then look at the sql code and change the = to <>

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Access Query NOT EQUAL Join

    If you use the Unmatched query wizard Access will guide you through.

    SELECT [SBU Output].*
    FROM [SBU Output] LEFT JOIN country ON [SBU Output].[Employee ID] = [SBU Employee List].[SBU Employee ID]
    WHERE [SBU Employee List].[SBU Employee ID] Is Null
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    Re: Access Query NOT EQUAL Join

    Shouldn't I use <> instead of the =?

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Access Query NOT EQUAL Join

    Did you try what I posted or the query wizard?

  6. #6
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    Re: Access Query NOT EQUAL Join

    Thanks Norie, everything seems to work fine in response to what you suggested. Much appreciated!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1