Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2008
    Posts
    19

    Unanswered: find last or most current date?

    i have a table that holds prices and effective date. when new prices come into effect i need to only calculate with those values. so how would i get the record with the newest date?

    use a query to get newest date?

    i dont know about querying for last because what if the they are not in order? my Bill report is the only thing that uses the prices table, and its only to calculate usage and put a price to it.

    any ideas?

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    This should give you a kick start
    Code:
    SELECT product_id
         , Max(your_date)
    FROM   your_table
    GROUP
        BY product_id
    George
    Home | Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •