Topic
  • 2 replies
  • Latest Post - ‏2012-11-16T09:56:29Z by SystemAdmin
SystemAdmin
SystemAdmin
1731 Posts

Pinned topic Sort problem with DB2 V9.5.0.3 on Linux

‏2012-11-09T12:44:43Z |
Hello,

We are facing sort problems with DB2 V9.5.0.3 on Linux.

When we launch the following query:

select * from PROJECT order by NAME

we get the result you can find in the attachment sortProblem.xls

Is there any reason why we get the uppercase letters before the lowercase letters?

Is there any way we can change this?

We are at the following db2level:

DB21085I Instance "db2inst" uses "32" bits and DB2 code release "SQL09053"
with level identifier "06040107".
Informational tokens are "DB2 v9.5.0.3", "s081118", "MI00255", and Fix Pack
"3".
Product is installed at "/opt/IBM/db2/V9.5".

Many thanks in advance!

Kind regards,

Tony
Updated on 2012-11-16T09:56:29Z at 2012-11-16T09:56:29Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1731 Posts

    Re: Sort problem with DB2 V9.5.0.3 on Linux

    ‏2012-11-13T18:57:46Z  
    That is how the collating sequence is: Upper before Lower. You can do ORDER BY UCASE(name) will will sort case insensitive.

    Andy
  • SystemAdmin
    SystemAdmin
    1731 Posts

    Re: Sort problem with DB2 V9.5.0.3 on Linux

    ‏2012-11-16T09:56:29Z  
    Hi Tony,

    Probably something to do with the collating sequence you used when creating the database and/or the type of the NAME field in the PROJECT table.

    Can you post your DB related parameters and the DDL of PROJECT table?

    Thanks,

    LooW