Results 1 to 3 of 3
  1. #1
    hoachen is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    17

    Compare two tables

    HI Everyone,



    Thank you in advance for reading this post. I am not getting the result at the bottom. Please help me how to get below bottom result I want.
    SELECT Order2.OrderQty, Order2.Company, Order2.[Order#], Order1.OrderQty, Order1.Company
    FROM Order1 RIGHT JOIN Order2 ON (Order1.Company = Order2.Company) AND (Order1.[Order#] = Order2.[Order#])
    GROUP BY Order2.OrderQty, Order2.Company, Order2.[Order#], Order1.OrderQty, Order1.Company;

    OrderQty Company Order#
    8 Oop BBS
    12 abc AAA
    3 abc AAA

    OrderQty Company Order#
    7 Oop BBS
    12 abc AAA
    3 abc AAA

    Order2.OrderQty Order2.Company Order# Order1.OrderQty Order1.Company
    3 abc AAA 3 abc
    3 abc AAA 12 abc
    7 Oop BBS 8 Oop
    12 abc AAA 3 abc
    12 abc AAA 12 abc


    The result I need. How to get this?
    Order2#Company Order# Order1#OrderQty Order1#Company
    3 abc AAA 3
    7 Oop BBS 8
    12 abc AAA 12

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    join the 2 tables on [company] and [order#]
    then append (or make table) this join qry to a table with the new field names

  3. #3
    hoachen is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    17
    Nope, it still get the same result
    3 abc AAA 3 abc
    3 abc AAA 12 abc
    7 Oop BBS 8 Oop
    12 abc AAA 3 abc
    12 abc AAA 12 abc

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

Similar Threads

  1. Using Access to Compare Tables
    By britsgal in forum Access
    Replies: 1
    Last Post: 04-03-2014, 04:16 PM
  2. Replies: 5
    Last Post: 05-23-2012, 04:20 AM
  3. Compare records in 2 tables
    By RalphJ in forum Access
    Replies: 13
    Last Post: 03-06-2011, 07:43 AM
  4. Compare tables and tell me differences
    By cowboy in forum Programming
    Replies: 2
    Last Post: 08-11-2010, 08:32 AM
  5. Compare two tables
    By Igli in forum Access
    Replies: 2
    Last Post: 07-05-2010, 10:30 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