DB2 query results in Hex format — Need Character/String

血红的双手。 提交于 2019-12-02 07:36:29

Using your query, you can cast a string with another CCSID, eg :

select cast(ccdata as char(14) CCSID 37) from ORCTL where ccctlk = 'BUYRAK'

My guess is that it isn't returning hex...

Rather it's returning EBCDIC.

Your column is probably tagged with CCSID 65535, which tells the system not to translate it.

The right way to fix this issue, is to make sure the column is tagged with the appropriate CCSID; for example, 37 for US English.

The alternative, is to look for a "force translate" option in the settings of driver you're using.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!