Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002

    Unanswered: Simple question about a query...

    Ok I have a table called SaleProperty which includes house prices

    Now I want to output the property with the highest value and the lowest value so i came up with:

    SELECT *
    FROM SaleProperty
    WHERE price = (SELECT MIN(price) FROM SaleProperty)
    price = (SELECT MAX(price) FROM SaleProperty);

    Is there a better way of doing this? i.e. with one sub query instead of two?


  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    Short answer, no.

    You could try using the domain functions (dmin and dmax) and see if there's any performance gain, I'm not sure how they compare to a standard query...
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Jun 2002
    Teddy (not in the dodgey sense) I love you.

    Now all I have to do is convince my lecturer who marked me down for doing that , thanks

Posting Permissions

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