Results 1 to 2 of 2
  1. #1
    cperry88 is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    9

    Query Help Returning Most Recent Date's Value

    I have set up a database to compare competitor prices to my product prices. I have a competitor price table and my price table. All parts have been cross referenced in a separate table and are related to one another.



    Prices fluctuate throughout the year. When I have access to competitor pricing data, I store it in my database and insert a date into my date field for when the pricing is effective.

    Ex. Competitor Product A is stored in my DB with 3 different price points and relevant effective dates, as is Competitor Product B. These product price dates are not necessarily the same.

    I would like to run a query that will show my competitor's most recent pricing as it relates to my cross referenced part #'s.

    Ex. Competitor Product A's most recent price point is from 11/5/2013. Competitor Product B's most recent is 1/4/2014. I need the following produced in a query:

    Competitor Part # My Part # Competitor Price My Price Competitor Effective Date
    Product A x - - 11/5/2013
    Product B y - - 1/4/2014

    I have attempted to set this up myself. Keeping in mind that I have 3 different price points for both competitor products, this was the result of my query:

    Competitor Part # My Part # Competitor Price My Price Competitor Effective Date
    Product A x - - 11/5/2013
    Product A x - - 9/7/2013
    Product A x - - 1/8/2013
    Product B y - - 1/4/2014
    Product B y - - 11/4/2013
    Product B y - - 5/22/2013

    I don't need to see this, I just need to see the most recent data for each competitor part.

    Thanks in advance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,630
    Try a nested subquery that uses TOP qualifier. Review: http://allenbrowne.com/subquery-01.html#TopN
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. exclude the most recent date
    By crowegreg in forum Queries
    Replies: 2
    Last Post: 10-22-2013, 09:53 AM
  2. Choose the row with the MOST RECENT date
    By taimysho0 in forum Queries
    Replies: 1
    Last Post: 05-14-2012, 02:35 PM
  3. Display Most Recent Date
    By jsimard in forum Queries
    Replies: 2
    Last Post: 06-23-2011, 02:44 PM
  4. Get Recent Record without Id or date
    By pyog in forum Queries
    Replies: 5
    Last Post: 04-19-2011, 09:43 AM
  5. Replies: 4
    Last Post: 05-04-2010, 03:33 PM

Tags for this Thread

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