Question : Range of records

1) We are having DB2 UDB 9.1 Express C on SUSE Linux 10.2 and DB2 V5R3 on iseries AS/400

2) I need a range of records i.e. 50 at a time from:
SELECT empno, ename FROM EMP;

3) ROW_NUMBER is supported in Linux but not in iseries. Please give me platform neutral solution OR separate one for each platform will also do.

Answer : Range of records

it does not make my second suggestion invalid, you just need to modify it,
if you have a 2 column primary key then you should alter the second statement to:

select *
from myTable
where (col1 = saved_col1 and col2 > saved_col2)
or       (col1 > col1)
order by col1, col2

there is a redbook that explains this
you can find here:
http://www.redbooks.ibm.com/abstracts/sg247134.html?Open

it's for zos basically, but this part (called paging) is the same for all platforms
Random Solutions  
 
programming4us programming4us