IHSD
.IHS_2023
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
IHS_2023.FN_RAW_TO_GUID
Parameters
Name
Type
Mode
Definition
function fn_raw_to_guid( raw_guid in raw ) return varchar2 -- use AUTHID CURRENT_USER to execute with the privileges and -- schema context of the calling user AUTHID CURRENT_USER AS hex varchar2(32); begin hex := rawtohex(raw_guid); return lower(substr(hex, 7, 2) || substr(hex, 5, 2) || substr(hex, 3, 2) || substr(hex, 1, 2) || '-' || substr(hex, 11, 2) || substr(hex, 9, 2) || '-' || substr(hex, 15, 2) || substr(hex, 13, 2) || '-' || substr(hex, 17, 4) || '-' || substr(hex, 21, 12)); end;