IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SYSTABLES Ordered in ASCII Collating Sequence?


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Dec 01, 2010 10:07 pm
Reply with quote

Apparently, when
Code:
SELECT * FROM SYSIBM.SYSTABLES
WHEN OWNER = 'authid'
ORDER BY NAME

is executed the rows are ordered in ASCII collating sequence (i.e., digits before alphas).

  1. Has anyone else noticed this?
  2. Does anyone know how long it has been the case?
  3. Can anything be done other than resorting the list? (There don't appear to be any documented features in the V9.1 SQL Reference.)
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Wed Dec 01, 2010 10:24 pm
Reply with quote

since V8 catalog is in Unicode
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Thu Dec 02, 2010 9:58 am
Reply with quote

Hi Akatsukami

While executing your query in DB2 V8.1 I got the following result.
Can you say why I am getting this error please?

Code:
---------+---------+---------+---------+---------+---------+---------+---------+
  SELECT * FROM SYSIBM.SYSTABLES                                        00000199
  WHEN OWNER = 'DSRC023'                                                00000299
  ORDER BY NAME;                                                        00000399
---------+---------+---------+---------+---------+---------+---------+---------+
DSNT408I SQLCODE = -199, ERROR:  ILLEGAL USE OF KEYWORD WHEN.  TOKEN FOR WITH   
         FETCH ORDER UNION EXCEPT QUERYNO OPTIMIZE WAS EXPECTED                 
DSNT418I SQLSTATE   = 42601 SQLSTATE RETURN CODE                               
DSNT415I SQLERRP    = DSNHPARS SQL PROCEDURE DETECTING ERROR                   
DSNT416I SQLERRD    = 506  0  0  -1  75  0 SQL DIAGNOSTIC INFORMATION           
DSNT416I SQLERRD    = X'000001FA'  X'00000000'  X'00000000'  X'FFFFFFFF'       
         X'0000004B'  X'00000000' SQL DIAGNOSTIC INFORMATION                   


Thanks
Raghu
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Dec 02, 2010 10:10 am
Reply with quote

Hello,

Because you used copy/paste instead of cloning a query you have that runs successfully. . . icon_smile.gif

This SELECT requires a WHERE not a WHEN.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Dec 02, 2010 4:22 pm
Reply with quote

dick scherrer wrote:
Hello,

Because you used copy/paste instead of cloning a query you have that runs successfully. . . icon_smile.gif

This SELECT requires a WHERE not a WHEN.

You are correct icon_redface.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Cobol program with sequence number ra... COBOL Programming 5
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts EBCDIC and ASCII CICS 7
No new posts Find missing sequence for every key DFSORT/ICETOOL 3
No new posts GDG all in sequence order JCL & VSAM 9
Search our Forums:

Back to Top