View previous topic :: View next topic
|
Author |
Message |
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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).
- Has anyone else noticed this?
- Does anyone know how long it has been the case?
- 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 |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
since V8 catalog is in Unicode |
|
Back to top |
|
|
Raghu navaikulam
Active User
Joined: 27 Sep 2008 Posts: 193 Location: chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Because you used copy/paste instead of cloning a query you have that runs successfully. . .
This SELECT requires a WHERE not a WHEN. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
dick scherrer wrote: |
Hello,
Because you used copy/paste instead of cloning a query you have that runs successfully. . .
This SELECT requires a WHERE not a WHEN. |
You are correct |
|
Back to top |
|
|
|