Results 1 to 5 of 5

Thread: select max

  1. #1
    Join Date
    Oct 2003
    Posts
    233

    Unanswered: select max

    I have a table with rates and i would like to get the most recent rate i was thinking of using max, and i dont want to do select top 1 and order decending. how could i do this?

    This wasnt working
    Select tblRates.Rate , Max(tblDates.monthEnddate)
    From tblRates inner join tblDates on tblRate.RateDate=tblDate.MonthEndDate
    Group by tblRates.Rate

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    why wan't it working? it looks fine to me
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    From tblRates inner join tblDates on tblRate.RateDate=tblDate.MonthEndDate
    Looks like a naming issue to me... at first glance.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    good eye!!
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Thanks r937
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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