Topic
  • No replies
SystemAdmin
SystemAdmin
3105 Posts

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