开发者

Oracle SQL convert HEX to char

开发者 https://www.devze.com 2023-03-23 13:26 出处:网络
i am trying to convert a he开发者_如何学Goxadecimal to character in Oracle ideally something like this for Microsoft SQL Server

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

精彩评论

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