Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle HEXTORAW Function      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

Term: HEXTORAW

Definition:
The Oracle HEXTORAW function converts character data containing hexadecimal digits in the CHAR, VARCHAR2, NCHAR, or NVARCHAR2 character set to a raw value. This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion.

Example Syntax:

HEXTORAW(hex_value)


Example Usage:

INSERT INTO user_data VALUES (HEXTORAW('7D'));


The following example converts hexadecimal digits to a raw value and casts the raw value to VARCHAR2:

SELECT utl_raw.cast_to_raw('c102') FROM DUAL;

UTL_RAW.CAST_TO_RAW('C102')
--------------------------------------------------
63313032


Related Links:

Related Code Snippets:
  • HEXTORAW - HEXTORAW converts char containing hexadecimal digits in the CHAR, VARCHAR2, NCHAR, or N...
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 168 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?