Results 1 to 3 of 3
  1. #1
    genedi is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2015
    Posts
    2

    Unique Values in Query

    Hi,

    Building a query and have two tables joined. One table has a list of computers and the other has a list of software. I'm trying to ascertain which computers don't have a certain software installed(in this case its McAfee DLP Endpoint). I'm finding with my query I'm getting all software titles installed on a computer and it only eliminates that specific title of software. What i'd like to do is have it only show the computer that does not have that software title once.
    Click image for larger version. 

Name:	Screen Shot.JPG 
Views:	9 
Size:	63.2 KB 
ID:	21995

    Hopefully I've not confused anyone.....hope someone can help.

    Thanks,



    Gene

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Did you try using the Find Unmatched query wizard to help construct query?
    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
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Based on your tables, I think if you use the software table to identify those computernames that do have
    the software, then create another query to identify those computernames that are not in the first query.

    Th sql would look like this in one query
    Code:
    SELECT TblComputer.computername
    FROM TblComputer
    WHERE computername NOT IN 
    (
      SELECT tblSoft_ware.ComputerName
      FROM tblSoft_ware
      WHERE  tblSoft_ware.SoftwareName ="McAfee DLP Endpoint" 
    );
    However, I question your table designs generally. Using SoftwareId as the Primary Key, I would expect each Software to be uniquely identified by that PK (expectation not absolute). But if 20 computers all have software "MzToolsForVBA", your design would have 20 different SoftwareID values for the same software. But you know what you mean by SoftwareID and readers don't.

    I think a more practical design would be

    tblComputer
    with a unique id for each computer
    and only info specific to the computer

    tblSoftware
    with softwareId a unique number assigned to a specific software product

    tblComputerHasSoftware
    a junction table that identifies
    the computer by ID
    and the software by softwareID
    and the other details related to this software on this computer
    eg. installed, version, publisher... whatever makes sense in your business


    Good luck.

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

Similar Threads

  1. Counting unique values in a query
    By DHIGHTO in forum Queries
    Replies: 4
    Last Post: 01-21-2015, 08:19 AM
  2. Replies: 3
    Last Post: 02-24-2014, 02:19 PM
  3. Limiting Query Results to Unique Values
    By orangeman2003 in forum Queries
    Replies: 2
    Last Post: 12-25-2013, 01:08 PM
  4. Unique values
    By helpaccess in forum Queries
    Replies: 3
    Last Post: 09-19-2011, 03:46 PM
  5. Duplicate Query Reporting Unique Values...
    By Tomfernandez1 in forum Queries
    Replies: 5
    Last Post: 04-19-2011, 04:22 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