Results 1 to 3 of 3

Thread: MAX by DATE

  1. #1
    Join Date
    Dec 2005
    Posts
    266

    Unanswered: MAX by DATE

    for access 2000

    with the following

    Table1

    Id1 | Id2 | Date
    --------------------------
    1 | 2 | 13/08/2004
    1 | 2 | 01/06/2004
    1 | 2 | 05/11/2003
    1 | 2 | 10/06/2004

    2 | 2 | 01/06/2004
    2 | 2 | 20/02/2006
    2 | 2 | 13/08/2004
    2 | 2 | 10/06/2004
    2 | 2 | 05/11/2003



    I need Distinct Id1 and Id2 for MAX(Date)
    1 | 2 | 13/08/2004
    2 | 2 | 20/02/2006



    thank you for helping

  2. #2
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    SELECT Id1, Id2 Max([Date]) AS MaxOfDate FROM Table1 GROUP BY Id1, Id2;

  3. #3
    Join Date
    Dec 2005
    Posts
    266
    it works thank you

Posting Permissions

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