locked
SQL string to select the lowest value from the field ? RRS feed

  • Question

  • User-96023207 posted

    Hello,

     Does anyone knows the easiest way to select the lowest value in the access table?  I have 2 fields in access table (Names and Values).  I want to get a distince name with the lowest value in the same list of names, is there a way to do it, like sql string maybe?  thanks in advance

     

    Wednesday, May 27, 2009 10:56 AM

Answers

  • User1052258516 posted

    Replace @data with your table name

    SELECT [Values], [Names]
    FROM @data
    WHERE [Values] = (SELECT MIN([Values]) FROM @data)
     
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 27, 2009 10:21 PM

All replies

  • User1052258516 posted

    Replace @data with your table name

    SELECT [Values], [Names]
    FROM @data
    WHERE [Values] = (SELECT MIN([Values]) FROM @data)
     
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 27, 2009 10:21 PM
  • User-96023207 posted

    Thank you William

    Thursday, May 28, 2009 9:46 AM