How to convert unicode russian string to it's hexadecimal representation?

Database

How to convert unicode russian string to it's hexadecimal representation?

Hi, All.

I have TD database with tables with columns like "VARCHAR(1024) CHARACTER SET UNICODE NOT CASESPECIFIC".

The columns contains russian string data (like "Дата", "Договор", etc..).

I use SQL Assistant with UTF8 session, and it shows results of selects (like "select * from tab1") all ok - like russian strings.

But i need to see it like "_UNICODE '0414043E0433043E0432043E0440'XCV", not like "Договор".

HOW CAN I CONVERT UNICODE STRING TO IT'S HEXADECIMAL REPRESENTATION???

2 REPLIES

Re: How to convert unicode russian string to it's hexadecimal representation?

select _UNICODE '0414043E0433043E0432043E0440'XCV

converts unicode_hex->rus_string, but i need vice versa: rus_string->unicode_hex

Re: How to convert unicode russian string to it's hexadecimal representation?

Well... founded:

SELECT CHAR2HEXINT('Договор')