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
精彩评论