Results 1 to 4 of 4
  1. #1
    kbsudhir is offline Novice
    Windows Vista Access 2003
    Join Date
    Apr 2009
    Posts
    10

    Angry Comparing two tables to find non-similar records

    Hi All,



    I want to create a query which compares common field of two tables & should provide the list of records which are not common from Table 1.

    SELECT [Table1].Material
    FROM Table1, Table2 WHERE ((([Table1].Material)<>[Table2].[Material]));

    Both table have more than 200000 records.

    But when I run the query I get more than 500000 records ... I don't know from where.
    I just want to get the records from Table1 which are not common in Table2.

    Please guide to get this done.

    Regards
    Sudhir

  2. #2
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Have you tried using the
    Find Unmatched Query Wizard
    in the
    Query Wizard ?

    Thanks

  3. #3
    kbsudhir is offline Novice
    Windows Vista Access 2003
    Join Date
    Apr 2009
    Posts
    10
    Thanks recyan. I really forgot about that. But got it done by writing the below query.

    SELECT [Table1].[material]
    FROM Table1 WHERE material NOT IN
    (SELECT [Table2].[material] FROM [Table2]);

    Thanks
    Sudhir

  4. #4
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Glad you got things working.
    I don't know which of the 2 is more efficient when used with lots of data.
    Let's hope some one comes along & comments on that.

    Thanks

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

Similar Threads

  1. Comparing two tables to find missing items
    By Jerseynjphillypa in forum Queries
    Replies: 11
    Last Post: 05-16-2012, 09:56 AM
  2. Comparing records in 2 tables
    By jlgray0127 in forum Forms
    Replies: 1
    Last Post: 03-16-2012, 01:53 PM
  3. Comparing Records in two (2) Tables.
    By RalphJ in forum Programming
    Replies: 19
    Last Post: 04-19-2011, 02:50 AM
  4. Replies: 6
    Last Post: 02-10-2011, 07:09 AM
  5. Replies: 1
    Last Post: 01-22-2010, 03:21 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