Results 1 to 3 of 3
  1. #1
    Igli is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    2

    Compare two tables

    Compare two tables
    Hi! I need some help, i am new in this and i don't now what i will ask make sense.



    Two tables with merchant offers different price for the same article.

    Table 1 with merchants

    Article 1 Article 2

    Igli 5 4
    John 8 3
    Ben 6 5

    Table 2 with merchants

    Article 1 Article 2

    Igli 7 3
    Fred 6 9
    Ben 6 6

    I want to find merchant who is in both two tables and buy from him who has the highs price.
    In the example above i will buy from Igli article 1 with price 7 and Ben article 2 with price 6
    Thanks for any help (sorry for my english)

  2. #2
    Datagopherdan is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Dec 2008
    Posts
    220
    First thing is that this should be setup as relational. In 1 table, you should have your merchant information e.g. Name, Address, Phone etc. and in your other other one, you should have the merchant price info e.g. product, price and match not on the merchant name but something like an Auto-ID field that you would create in the table with your merchant information and an integer type ID field in the table with the product information.

    I'll assume that this is just a one time deal to get these figures, so you would create a query and match up on the name in the 2 queries. You would then add the following fields.

    Merchant Name
    Product
    Price

    You would press totals, it's the toolbar option that kind've looks like an E. You would then group on the merchant name and product and select max for the price.

  3. #3
    Igli is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    2

    Thanks

    Thank you for your answer. But i think you miss understand me. I want to solve this problem: In two different places i find to different table with merchants who offers for these two articles different prices. I want to identify the merchant who appear in both tables and then to compare the prices he offers in this two different tables. For example In one table for article one he offers 5 and in the other table he offer 6. i want to identify this and pick 6. I know this make sound odd but this is an example to explain what i need to do because i dont' know how to explain different. Thanks again for your answer and if you understand now what i am looking for and know how to do i will bag you to write as simple as you can because i am new but very new in this.
    The best regards from Igli

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

Similar Threads

  1. Replies: 7
    Last Post: 01-29-2014, 02:45 PM
  2. Compare msaccess data
    By dref in forum Queries
    Replies: 10
    Last Post: 05-14-2010, 05:35 AM
  3. Using IIF to compare two fields data
    By psych in forum Access
    Replies: 2
    Last Post: 03-10-2010, 10:11 AM
  4. Compare two fields!
    By finditsol in forum Forms
    Replies: 1
    Last Post: 02-11-2010, 01:43 PM
  5. Compare date in a sql query
    By access in forum Forms
    Replies: 2
    Last Post: 06-17-2009, 12:57 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