473,320 Members | 2,098 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

rank(), denseRank() etc...

TP
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.DataException: 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.
Nov 12 '05 #1
1 9379
I don't think the olap functions are available on mvs/os390/zos db2.

For portable sql, you can look at the
The SQL Reference for Cross-Platform Development

http://www-106.ibm.com/developerwork...206sqlref.html

The doc for your version is here
http://www-306.ibm.com/software/data...0/library.html

PM

"TP" <tp******@hotmail.com> a écrit dans le message de
news:59*************************@posting.google.co m...
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.DataException: 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.

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Can | last post by:
I am creating an on-line survey. I want the user to have a list of choices of say 10 items that are radio buttons. They need to rank their preference. They click on preference 1, that option is...
3
by: bughunter | last post by:
I discover next problem I have view definition with rank() create view vTEST as select c1, c2, c3, ... -- problem area start , rank() over (order by c3) as RNK -- problem area stop from...
3
by: Elden Carnahan | last post by:
I am trying to derive rank values in a query, just as one would with the Rank function in Excel. Can't see how to do this elementary task. Can anyone advise?
2
by: dam_fool_2003 | last post by:
Just now I asked a question about signed char and unsigned char. I had the replay very fast by jens.torring and Tim prince. I post via google so now goes my thanking replay. (I must be more precise...
1
by: Joe | last post by:
Has anyone written a percentile rank algorithm that they can share or know of a good resource that defines the algorithm. I'm starting a project that involves percentile ranks, logistic and linear...
13
by: Steve Edwards | last post by:
Hi, Given a map: typedef map<long, string, greater<long> > mapOfFreq; Is there a quicker way to find the rank (i.e. index) of the elememt that has the long value of x? At the moment I'm...
1
by: volunteer | last post by:
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="filename.xsl"?> <markers date="20060523"> 04:21:50 PM <marker sn="1" rank="6" name="john" /> <marker sn="2" rank="5"...
2
by: orenlevy1 | last post by:
Hi Everyone. I have a problem that I could not figure out what to do with it. I have a couple of tables and views. All have the same unique ID. When a user try to do a search on our web site...
6
by: canabatz | last post by:
Hello . i got a list of user with ranking . i want to display the first five places where it is not the same user, like that john : is rank 1 john john david : is rank 2 albert : is rank 3...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.