Page 1 of 1

DB2 Row selection

PostPosted: Thu Sep 25, 2008 1:36 pm
by ram23bal
Hi All,

In table i have to select only from 100 th row to 1000th row. Say Table has 5000 rows. Can anyone help me...?

Re: DB2 Row selection

PostPosted: Fri Sep 26, 2008 1:56 am
by dick scherrer
Hello,

Tables do not have a 100th row. . . If you want some unpredictable set of rows you could declare a curaor for the table, open the cursor, fetch and ignore 100 rows, continue to fetch rows and process them until you reach 1000 and then close the cursor.

This will get the number of rows you said you want, but is not worth much as a solution. If the query is run again later, the rows used are likely to be a different set of rows.