Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
SystemAdmin
SystemAdmin
3105 Posts
ACCEPTED ANSWER

Pinned topic How DB2ZOS Compares char/varchar

‏2012-11-19T09:16:22Z |
Dears,

The following sql statements return different results from between DB2LUW/ORACLE/... AND DB2ZOS. Could anyone help to explain why no row returned from DB2ZOS(it's supposed to be returned?)? AFAIK, in other databases, it compares the ascii code of the character.

select 'TEST' AS TEST from sysibm.sysdummy1 WHERE 'a' > '3'

select 'TEST' AS TEST from sysibm.sysdummy1 WHERE 'a' > 'A'

The following sql executes correctly:
select 'TEST' AS TEST from sysibm.sysdummy1 WHERE 'a' > 'b'

Thanks,
RR