Results 1 to 3 of 3

Thread: SQL Statement

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    Singapore
    Posts
    108

    Talking

    Hi Guys,

    In SQL Query, SELECT TOP 50 is to retrieve 50 rows from a table.
    But can someone please tell me how do you select from row 50 to 100?

    Thanx in Advance.

    KT

  2. #2
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    after you get top 50,
    get the record number of the last one in the batch
    and redo your sql to get another 50

    so if you had 100 records
    you say sql = "SELECT TOP 50....."
    then your next sql could go
    sql = "SELECT TOP 50..... WHERE recordnum > 50..."

    if that doestn help or is out of wack
    rephrase your question and i will take another shot at the answer

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    Singapore
    Posts
    108
    Thanx dude.
    Thought that doing that as well. My main intention is to retrieve a range of recordset without declaring additional variables to keep count.

    Appreciate your help tho.

    Best Regards.

    KT

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