Hi all,
I am trying to learn DB2 on os390 and this is my version is :
Database server = DB2 OS/390 7.1.1
I was trying to run this query
=============== ======
SELECT EMPNO, RANK() OVER(ORDER BY EMPNO) AS RANK# ,DENSE_RANK()
OVER(ORDER BY EMPNO) AS DENSE# FROM DSN8710.EMP ORDER BY EMPNO
=============== ======
and i get this error
=============== =====
DBA2191E SQL execution error.
com.ibm.db.Data Exception: A database manager error occurred. :
[IBM][CLI Driver][DB2] SQL0104N An unexpected token "(" was found
following "". Expected tokens may include: ", FROM INTO ".
SQLSTATE=42601
=============== ===
Any ideas why I am getting this error? I think 7.1.1 should support
these functions? I tried these on 3270 but I got the same errors.
Thanks.
I am trying to learn DB2 on os390 and this is my version is :
Database server = DB2 OS/390 7.1.1
I was trying to run this query
=============== ======
SELECT EMPNO, RANK() OVER(ORDER BY EMPNO) AS RANK# ,DENSE_RANK()
OVER(ORDER BY EMPNO) AS DENSE# FROM DSN8710.EMP ORDER BY EMPNO
=============== ======
and i get this error
=============== =====
DBA2191E SQL execution error.
com.ibm.db.Data Exception: A database manager error occurred. :
[IBM][CLI Driver][DB2] SQL0104N An unexpected token "(" was found
following "". Expected tokens may include: ", FROM INTO ".
SQLSTATE=42601
=============== ===
Any ideas why I am getting this error? I think 7.1.1 should support
these functions? I tried these on 3270 but I got the same errors.
Thanks.
Comment