Results 1 to 2 of 2
  1. #1
    K Roger is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Sep 2011
    Posts
    27

    Find 2nd or 3rd highest record with a query

    There are fairly simple queries to find the maximum or minimum value for a field in a grouped by query that may have 2-3 or more groupings, but is it possible to find, say the 2nd and/or 3rd highest values and their associated fields in an ACCESS (2003) query? or must one resort to VBA programming. In either case, how is this done - if it can be done?



    Thanks,

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Finding top 3 is fairly easy - see http://allenbrowne.com/subquery-01.html

    Picking out the 2nd or 3rd is trickier. Google: sql second highest query

    Here is one http://blog.sqlauthority.com/2008/04...maximum-value/
    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. Select 5 highest values
    By frozendmj in forum Queries
    Replies: 1
    Last Post: 04-19-2011, 03:18 PM
  2. Find Record using Query
    By tomself1 in forum Programming
    Replies: 3
    Last Post: 04-18-2011, 09:34 AM
  3. Query to return only the row containing the highest date.
    By eric.opperman1@gmail.com in forum Queries
    Replies: 4
    Last Post: 03-22-2011, 08:42 PM
  4. query to find the highest value in a field
    By jhjarvie in forum Queries
    Replies: 0
    Last Post: 09-02-2008, 02:27 PM
  5. How to Find a Record
    By lschlitt in forum Programming
    Replies: 2
    Last Post: 09-09-2006, 06:24 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