Purpose
You can call this function to convert LONG RAW and RAW values to BLOB values.
Syntax
TO_BLOB(raw_value)
Parameters
raw_value is of the LONG RAW or RAW data type.
Return type
The return type is BLOB.
Examples
The following example converts RAW values in the existing table tbl_raw to BLOB values and returns the lengths in byte.
obclient> SELECT COL_RAW,LENGTHB(COL_RAW) "LENGTHB_RAW",LENGTHB(TO_BLOB(COL_RAW)) "LENGTHB_BLOB"
FROM tbl_raw;
+------------------+-------------+--------------+
COL_RAW LENGTHB_RAW LENGTHB_BLOB
+------------------+-------------+--------------+
0ABC 4 2
0123456789ABCDEF 16 8
+------------------+-------------+--------------+
2 rows in set