Results 1 to 1 of 1
  1. #1
    Join Date
    Jun 2016
    Posts
    1

    Question Unanswered: Effective Date SubQuerty

    Good Morning
    This should be easy, but I just can't get it to work

    I have 1 table that contains a meter number and a date
    0067478301 06/01/2016
    0111219701 05/15/2016
    0141791401 04/21/2016

    In a second table, I have a list of Pressure's for each meter with an effective data and a modified date.
    It is possible for a code number to have two records for the same effective date with different modified dates.

    METER # EFFECTIVE MODIFIED PRESSURE
    0067478301 1995-10-01 1995-10-16 14.65
    0067478301 1995-10-01 1995-12-13 12.64
    0067478301 1999-05-01 1999-06-07 14.65
    0067478301 2002-05-01 2002-06-06 14.73
    0111219701 1995-10-01 1995-10-16 11.75
    0111219701 1997-08-01 1997-08-25 14.73
    0111219701 2010-12-01 2011-01-06 11.79
    0111219701 2011-11-01 2011-11-03 14.73
    0141791401 1996-11-01 1996-12-05 11.48
    0141791401 1998-10-01 2000-06-02 14.73
    0141791401 2001-10-01 2003-11-07 11.48
    0141791401 2005-05-01 2005-06-07 14.73

    All I need to do is find the most current pressure for each meter number for the given date in table 1
    But, I can't get a sub-query to work

    Thanks for any assistance!
    Deb Riggs
    Last edited by debriggs; 07-04-16 at 14:10.

Posting Permissions

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