开发者

Oracle SQL convert HEX to char

i am trying to convert a he开发者_如何学Goxadecimal to character in Oracle ideally something like this for Microsoft SQL Server

select xx('0A') from dual;

where 0A is hexadecimal for newline in Unix.


Try

SELECT UTL_I18N.RAW_TO_CHAR (<string>, <src_char_set>) FROM DUAL; 

For example,

SELECT UTL_I18N.RAW_TO_CHAR ('0A', 'AL32UTF8') FROM DUAL;


or

SELECT ASCIISTR(CHR(TO_NUMBER('0A','xx'))) FROM DUAL


Try the HEXTORAW converion function and check the reference for more conversion funcitons

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜