Use utl_raw.cast_to_raw to convert string to raw : utl_raw « System Packages « Oracle PL/SQL Tutorial






SQL>
SQL>
SQL> select utl_raw.cast_to_raw( 'Hello World!' ) data
  2    from dual;

DATA
--------------------------------------------------------------------------------
48656C6C6F20576F726C6421

SQL>








31.39.utl_raw
31.39.1.utl_raw.cast_to_raw
31.39.2.Use utl_raw.cast_to_raw to convert string to raw
31.39.3.select utl_raw.cast_to_varchar2(hextoraw('787878')) from dual
31.39.4.select utl_raw.cast_to_varchar2(hextoraw('534d495448')) from dual
31.39.5.Difference between utl_raw.length and length
31.39.6.Use utl_raw.substr