In oracle 10g, how do you convert SYS_GUID() to varchar? I am trying something like:
select USER_GUID from user where email = 'user@example.com'
Which returns the RAW byte[]. Is it possible to use a function to convert the RAW to VARCHAR2 in the SQL statement?
Don’t forget to use
HEXTORAW(varchar2)when comparing this value to theRAWcolumns.There is no implicit convesion from
VARCHAR2toRAW. That means that this clause:will be impicitly converted into:
, thus making indices on
raw_columnunusable.Use:
instead.