Results 1 to 2 of 2
  1. #1
    hashjax is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    1

    Relative Data from a TABLE

    Hi,



    I am trying to get relative data from a table, when I use Min, Max option. What I want to do is get the relative data in Column X with Column Y for which I used Min or Max.

    Hopefully this example will better explain:

    This is my table:
    Name Revision Status Date
    A 1 1 1-Jan-10
    A 2 0 2-Jan-10
    B 1 2 1-Jan-10
    B 2 1 2-Jan-10
    B 3 3 3-Jan-10
    C 1 2 1-Jan-10
    C 2 1 2-Jan-10


    What I want is :
    Unique Name | MAX Revision | Max Status | Date (relateive to Max status selected)

    So I should get :
    Name Revision Status Date
    A 2 1 1-Jan-10
    B 3 3 3-Jan-10
    C 2 2 1-Jan-10


    Is there a way to do this in 1 query? I can do it in multiple query where I select / Join based. I want to know the most efficient way to do this.

    regards,
    Harsh

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I typically use 2 queries:

    http://www.baldyweb.com/LastValue.htm

    You can do the first as a subquery in the second, but I find it harder to view/maintain, and I usually have more than one use for the first query anyway.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 4
    Last Post: 01-05-2011, 07:56 AM
  2. relative path to sounds... strange
    By ymds in forum Programming
    Replies: 3
    Last Post: 07-14-2010, 03:05 PM
  3. Replies: 0
    Last Post: 08-01-2009, 12:43 PM
  4. relink to relative path TXT data files
    By tobynegus in forum Programming
    Replies: 0
    Last Post: 08-19-2008, 10:10 AM
  5. Access 2007 Attachments - Relative reference
    By soringc in forum Programming
    Replies: 0
    Last Post: 11-22-2007, 10:47 AM

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