Click to See Complete Forum and Search --> : Selecting rows
dvst8
Jun 15th, 2000, 12:29 AM
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/
JHausmann
Jun 15th, 2000, 01:35 AM
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.
JHausmann
Jun 15th, 2000, 01:48 AM
If you're using ADO, the recordset object has a find method which has a skip#of records property. Might be worth looking into...
dvst8
Jun 15th, 2000, 02:55 AM
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\/
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.