Min() / Max() problem

Results 1 to 2 of 2

Thread: Min() / Max() problem

  1. #1
    Join Date
    Dec 1969

    Default Min() / Max() problem

    What is the proper syntax for retrieving the MIN and MAX values from a database?<BR><BR>I have the following:<BR><BR>strSQLminmax = "SELECT MIN(Quizscore), MAX(Quizscore) FROM employeeanswers "<BR><BR>The above statement yields no object found.<BR><BR>Do I need a separate statement for MIN and a MAX?<BR><BR>James

  2. #2
    Join Date
    Dec 1969

    Default RE: Yes...

    You can&#039;t have both "MIN" and "MAX" in the same SQL statement...<BR><BR>You can either do...<BR>SELECT MIN(Quizscore) FROM employeeanswers<BR><BR>Or<BR>SELECT MAX(Quizscore) FROM employeeanswers<BR><BR>Not both...<BR>

Posting Permissions

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