Results 1 to 3 of 3
  1. #1
    black272 is offline Novice
    Windows 10 Access 2007
    Join Date
    Dec 2021
    Posts
    5

    Excluding data if appears in a sub query


    Hey guys,

    Hoping I could get some help with a task that has always proved problematic for me. I want to be able to run a general query (no problem so far). But I also want to remove a large set of IDs from that query if they appeared in a subquery. Typical joins dont seem to work for this. Any advice would be appreciated

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Maybe like:

    SELECT * FROM table1 WHERE NOT ID in (SELECT ID_FK FROM table2 WHERE something)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

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

Similar Threads

  1. Replies: 2
    Last Post: 09-23-2016, 11:55 PM
  2. Replies: 1
    Last Post: 06-10-2014, 02:32 PM
  3. Excluding data
    By Vic1980 in forum Queries
    Replies: 3
    Last Post: 03-14-2012, 06:34 AM
  4. Replies: 4
    Last Post: 02-08-2010, 11:17 AM
  5. Excluding data in a query
    By lpdds in forum Queries
    Replies: 1
    Last Post: 12-16-2009, 08:06 PM

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