Use utl_raw.cast_to_raw to convert string to raw data in Oracle Options

codeling 1264 - 5430
@2019-09-24 10:01:22

The UTL_RAW package is a PL/SQL package that contains procedures for converting and packing message data which is sent back and forth through the WebSphere MQ queues using the RAW data type and PL/SQL data types.

UTL_RAW.CAST_TO_RAW converts a value of data type VARCHAR2 into a raw value with the same number of bytes. The input value is treated as if it were composed of single 8-bit bytes, not characters. Multibyte character boundaries are ignored. The data is not modified in any way, it is only changed to data type RAW.

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


Users browsing this topic