Results 1 to 3 of 3

Thread: SQL Easy

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441
    Using ADO, how did you write a query to select the maximim value in a field? ???

    Select * from Table ...
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  2. #2
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    736

    Cool

    Try a Select statement like the following. Use the "AS" feature to save the maximum value in a variable.

    [code]
    rsMax.Open "Select max(user_id) AS maxValue from user", dbFBI, adOpenDynamic, adLockReadOnly

    MsgBox rsMax!maxValue

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Thumbs up Thanks

    I had a few probelms with VBNULL but worked through them. Thank you for the help.
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

Posting Permissions

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



Click Here to Expand Forum to Full Width