HP Neoview SQL Reference Manual page 388

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

SELECT I1, RUNNINGRANK (I1) AS RANK
FROM cat.sch.seqfcn
SEQUENCE BY I1;
I1
-----------
1
2
3
4
5
6
8
10
--- 8 row(s) selected.
Return the rank of I1 descending:
SELECT I1, RUNNINGRANK (I1) AS RANK
FROM cat.sch.seqfcn
SEQUENCE BY I1 DESC;
I1
-----------
10
8
6
5
4
3
2
1
--- 8 row(s) selected.
Return the rank of I2, using the alternative RANK syntax:
SELECT I2, RANK (I2) AS RANK
FROM cat.sch.seqfcn
SEQUENCE BY I2;
I2
-----------
100
100
200
200
200
300
?
?
--- 8 row(s) selected.
Notice that the two NULL values received the same rank.
Return the rank of I2 descending, using the alternative RANK syntax:
SELECT I2, RANK (I2) AS RANK
FROM cat.sch.seqfcn
SEQUENCE BY I2 DESC;
I2
388
SQL Functions and Expressions
RANK
--------------------
RANK
--------------------
RANK
--------------------
RANK
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
1
1
3
3
3
6
7
7

Advertisement

Table of Contents
loading

Table of Contents