Results 1 to 2 of 2
  1. #1
    DavidK111 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    18

    Query that shows which prices have changed in the most current daily refresh

    Hello - I am trying to build a query that displays Prices (along with four or five other columns of static information). The price column is the only column that changes daily, based on an upload of a separate file.



    Is there a good way for me to build the query so that the only items that display in the results are the rows that have had a price change from the prior day. In other words, I just need to export a report for prices that change from the prior day (i.e., not all rows).

    (I used to do this manually in Excel by having a separate column where I would paste/paste special/values the results from the prior day and then compare the two via a third column that would check for changes in the two columns.)

    Is this best accomplished via a 2nd query, or will some other formula in a separate column accomplish this. Thanks for any suggestions!

    - Dave

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,818
    Pulling value from another record of same table is tricky. Here is one way: http://allenbrowne.com/subquery-01.html#AnotherRecord

    Another is with domain aggregate functions. Assuming each item (Product ?) will have only one record each day:

    SELECT * FROM tablename WHERE Price <> DMax("Price", "tablename", "ProductID=" & [ProductID] & " AND DateField<#" & [DateField] & "#");
    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. Replies: 8
    Last Post: 05-07-2014, 11:21 AM
  2. Daily Job List Query - Current Date Issue
    By iProRyan in forum Queries
    Replies: 5
    Last Post: 02-14-2014, 02:39 AM
  3. Replies: 1
    Last Post: 10-12-2013, 05:39 PM
  4. Replies: 4
    Last Post: 04-16-2012, 11:48 AM
  5. keeping current entry in field until changed
    By Chazcoral in forum Forms
    Replies: 16
    Last Post: 09-09-2010, 12:01 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