Use utl_raw.substr : utl_raw « System Packages « Oracle PL/SQL Tutorial






SQL>
SQL> create table t ( r raw(10) );

Table created.

SQL>
SQL> insert into t values ( utl_raw.cast_to_raw('helloWorld' ) );

1 row created.

SQL>
SQL> select utl_raw.substr(r,2,3) r1, hextoraw(substr(r,3,6)) r2 from t
  2
SQL> drop table t;

Table dropped.

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