February 2010 Archives

About IBM DB2 z/OS V.8 is not support row_number(). From DB2PORTAL Blog just use count() and temporary table to solve this problem. Use this sql statement to limit result range, like pre/next page effect.

SELECT DEPTNO, ROW#
FROM DEDBADM.DEPT TB1,
TABLE (SELECT COUNT(*) + 1 AS ROW#
FROM DEDBADM.DEPT TB2
WHERE TB2.DEPTNO < TB1.DEPTNO) AS TDEPT_TAB
WHERE ROW# BETWEEN 50 AND 60
ORDER BY DEPTNO
FETCH FIRST 10 ROWS ONLY
OPTIMIZE FOR 10 ROWS
WITH UR;

February 2012

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      

Archives

Powered by Movable Type 4.34-en

About this Archive

This page is an archive of entries from February 2010 listed from newest to oldest.

January 2010 is the previous archive.

March 2010 is the next archive.

Find recent content on the main index or look in the archives to find all content.