Results 1 to 4 of 4

Thread: Selecting rows

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Posts
    142

    Question

    I need to write an SQL statement that selects 100 rows of data starting from the Xth row.

    ROWCOUNT = 100; SELECT * FROM tablename

    will get 100 rows, but how to instruct it not to start at the top of the table??

    thanks
    /d8/
    Secret to long life:
    Keep breathing as long as possible.

  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    If you have to do it in SQL (and only in SQL) add an identity column to a new table and copy the data from the old table into the new table.

    If you can use VB, count the number of movenext's issued before doing anything with the data.

  3. #3
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    If you're using ADO, the recordset object has a find method which has a skip#of records property. Might be worth looking into...

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Posts
    142
    thanks.

    that's about all i could come up with too.

    that a sh&&ty way of doing it...

    such is life i guess

    /\d8\/
    Secret to long life:
    Keep breathing as long as possible.

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