Reftohex

Description: REFTOHEX converts argument expr to a character value containing its hexadecimal equivalent. expr must return a REF.

REFTOHEX(<expr>);
 
CREATE TABLE warehouse_table OF warehouse_typ
   (PRIMARY KEY (warehouse_id));
 
CREATE TABLE location_table
   (location_number NUMBER, building REF warehouse_typ
   SCOPE IS warehouse_table);
 
INSERT INTO warehouse_table VALUES (1, 'Downtown', 99);
 
INSERT INTO location_table SELECT 10, REF(w) FROM warehouse_table w;
 
SELECT REFTOHEX(building) FROM location_table;
 
REFTOHEX(BUILDING)
--------------------------------------------------------------------------
0000220208859B5E9255C31760E034080020825436859B5E9255C21760E034080020825436

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.