Results 1 to 4 of 4
  1. #1
    GreenWizard is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2013
    Posts
    3

    Query values for trading

    Based on the table(s) below, with 1 equaling most valued & 8 equaling the least valued, I'm looking to identify differences in values that will help facilitate a trade.

    Owner Tool Joe Smith Rank Tom Brown Rank
    Joe Smith Axe 1 1
    Joe Smith Nails 8 7
    Joe Smith Saw 5 6
    Joe Smith Wrench 3 2
    Tom Brown Bolts 7 8
    Tom Brown Hammer 2 3
    Tom Brown Plyers 6 5
    Tom Brown Screwdriver 4 4

    For example, based on the information above, Joe Smith values a Hammer more than a Wrench AND Tom Brown values a Wrench more than a Hammer. As a result, the query should identify this and report a 'Hammer FOR Wrench' trade.



    A full query should output the following data below. I calculated this manually, but I'm looking to write a query to do this automatically and on a bigger scale with more data.

    Query Results:
    Nails (Joe Smith) FOR Bolts (Tom Brown)
    Wrench (Joe Smith) FOR Hammer (Tom Brown)

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,538
    Code:
    SELECT Sheet1.Owner, Sheet1.Tool, Sheet1.[Joe Smith Rank], Sheet1.[Tom Brown Rank]
    FROM Sheet1
    WHERE (((Sheet1.[Joe Smith Rank])=3)) OR (((Sheet1.[Tom Brown Rank])=3));
    Change criteria for each rank you wish to test.

  3. #3
    GreenWizard is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2013
    Posts
    3
    Thank you, but I'm confused about the "=3".

    I'm looking to match objects that have perceived values that are greater than AND less than 'certain variables'.

    I need to identify these variables.

    Thanks again.

  4. #4
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,538
    If you run this query changing the criteria, ie. "3" to whatever values you want, it will return the items in each of the two ranking fields that match that value. Showing for an equalization of values. In the case of three it returns exactly as you showed in the original thread. Did you try this out in your db.

    If your example is not what is your reality, then perhaps you should upload a sample database with dummy data that shows reality. Otherwise, I am confused by your request re: perceived values.

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

Similar Threads

  1. Replies: 2
    Last Post: 11-12-2012, 03:52 AM
  2. Replies: 8
    Last Post: 10-22-2012, 07:43 PM
  3. Replies: 2
    Last Post: 05-17-2012, 03:52 PM
  4. Replies: 34
    Last Post: 02-15-2012, 05:17 AM
  5. Query Table Values in Append Query
    By AKQTS in forum Queries
    Replies: 5
    Last Post: 11-12-2010, 03:58 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