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

    How to select only those rows from a table which don't exist in other table

    Hello,



    I have two tables with one common field. I want to select only those rows in the first table which values for the common field are different then the values for the common field in the second table.
    I have this sql query:

    SELECT NOVI.GBR
    FROM NOVI
    WHERE (((NOVI.GBR)>1080) AND ((Exists (SELECT distinct Avtobusi.Garbr FROM Avtobusi WHERE ( ((Avtobusi.Garbr)>1080)) ))=False));

    but I don't get anything as a result.

    Can anybody help me please?

    Thanks in advance

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Access has a nice Unmatched Query Wizard you can use to do this.
    If you work through it and create your query, you can then change the query to SQL view to see what that code looks like.

  3. #3
    Nel is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    2
    Thank you very much JoeM

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

Similar Threads

  1. check table, if exist then update another table
    By JeroenMioch in forum Programming
    Replies: 6
    Last Post: 07-06-2012, 09:12 AM
  2. Replies: 4
    Last Post: 06-21-2012, 05:39 PM
  3. Checking if data already exist in a Table
    By Phillsoft in forum Forms
    Replies: 2
    Last Post: 08-04-2011, 02:07 PM
  4. If value already exist or not in the table
    By dada in forum Programming
    Replies: 3
    Last Post: 08-19-2010, 01:57 AM
  5. Check if value exist in a table
    By Lucas83 in forum Programming
    Replies: 2
    Last Post: 06-02-2010, 11:42 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