Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old October 2nd, 2008, 10:57 AM
Newbie
 
Join Date: Jun 2007
Posts: 14
Default Row_number() over() not working in SPUFI

Hello! I am using UDB 8 in Z/OS and I am trying to execute this statement in SPUFI
Expand|Select|Wrap|Line Numbers
  1. select dept, name, row_number() over()
  2. from staff
It just doesn't work. Here is the error message:
Expand|Select|Wrap|Line Numbers
  1. ---------+---------+---------+---------+---------+---------+---------+---------
  2.   SELECT DEPT, NAME, ROW_NUMBER() OVER() FROM DBPROD.STAFF;
  3. ---------+---------+---------+---------+---------+---------+---------+---------
  4. DSNT408I SQLCODE = -104, ERROR:  ILLEGAL SYMBOL "(". SOME SYMBOLS THAT MIGHT BE
  5.          LEGAL ARE: , FROM INTO
  6. DSNT418I SQLSTATE   = 42601 SQLSTATE RETURN CODE
  7. DSNT415I SQLERRP    = DSNHPARS SQL PROCEDURE DETECTING ERROR
  8. DSNT416I SQLERRD    = 502  0  0  -1  39  0 SQL DIAGNOSTIC INFORMATION
  9. DSNT416I SQLERRD    = X'000001F6'  X'00000000'  X'00000000'  X'FFFFFFFF'
  10.          X'00000027'  X'00000000' SQL DIAGNOSTIC INFORMATION
Do I need to set something on? Or the command can't be executed in SPUFI?
Is there other command I can execute which will give me the same results?

thanks!
Karen

Last edited by docdiesel; October 4th, 2008 at 10:36 AM. Reason: Added code tags
Reply
  #2  
Old October 4th, 2008, 10:52 AM
docdiesel's Avatar
Moderator
 
Join Date: Aug 2007
Location: Munich
Posts: 284
Default

Hi Karen,

I'm sorry, but ROW_NUMBER() OVER() isn't supported in DB2 v8 for z/OS. While it's included in v8 for Linux, Unix and Windows, for z/OS it's been introduced with v9. See also the IBM Redbook "DB2 9 for z/OS Technical Overview", p. 19:

Data warehousing and reporting
* SQL enhancements
- EXCEPT and INTERSECT,
- OLAP specifications: RANK, DENSE_RANK, ROW_NUMBER
- Cultural sort
- Caseless comparisons
- FETCH FIRST in full select

Regards

Doc Diesel
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles