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

Term: RAWTOHEX

Definition:
In Oracle PL/SQL, RAWTOHEX is a built in function which converts a raw value to a character value in its hexadecimal format. It can accept one argument of any data type other than LONG, LONG RAW, CLOB, BLOB, or BFILE and returns it hexadecimal equivalent as character output.

Example Syntax:

RAWTOHEX (raw)


Example Usage:

The SQL query below takes EMPNO and ENAME as inputs to the RAWTOHEX function and returns their hexadecimal equivalent.

SELECT EMPNO EMPID, RAWTOHEX (EMPNO)  EMPHEX, ENAME, RAWTOHEX(ENAME) ENAME
FROM EMPLOYEE

EMPID EMPHEX ENAME ENAME
---------- ------------------- ---------- --------------------
100 C202 JOHN 4A4F484E
110 C2020B KATE 4B415445
120 C20215 MILLER 4D494C4C4552
130 C2021F JAGGER 4A4F484E59
140 C20229 LARRY 4C41525259
150 C20233 EDWIN 454457494E
160 C2023D KING 4B494E47
170 C20247 SUEZ 5355455A
180 C20251 HICK 4849434B

9 rows selected.



Related Links:

Related Code Snippets:
  • RAWTOHEX - RAWTOHEX converts raw to a character value containing its hexadecimal equivalent. The r...
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 169 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?