Results 1 to 3 of 3

Thread: Selecting 5 Records

  1. #1
    Amir Guest

    Selecting 5 Records

    I have a database which has a field called fldTimes. basically this field records the number of hits a file gets. How can I choose the most 5 popular files with the greatest hits. Thanks

  2. #2
    Ray Miao Guest

    Selecting 5 Records (reply)

    set rowcount 5

    your query ...

    set rowcount 0




    ------------
    Amir at 1/25/2002 11:24:52 AM

    I have a database which has a field called fldTimes. basically this field records the number of hits a file gets. How can I choose the most 5 popular files with the greatest hits. Thanks

  3. #3
    Vikram Swami Guest

    Selecting 5 Records (reply)

    Do the following,

    set rowcount 5
    select * from tablename order by fldTimes desc
    set rowcount 0


    ------------
    Ray Miao at 1/25/2002 1:26:09 PM

    set rowcount 5

    your query ...

    set rowcount 0




    ------------
    Amir at 1/25/2002 11:24:52 AM

    I have a database which has a field called fldTimes. basically this field records the number of hits a file gets. How can I choose the most 5 popular files with the greatest hits. 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
  •