TO_HEX
Sintassi
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> TO_HEX[TO_HEX]:::quoted
TO_HEX --> End((END))
Scopo
La funzione SQL TO_HEX converte un blob in una stringa di testo in notazione esadecimale.
Vedi anche ASCII_TO_BLOB, BLOB_TO_TEXT e HEX_TO_BLOB.
Parametri:
- Input (
blob): valore da convertire in notazione esadecimale.
Risultato: l'blob viene convertito in testo in notazione esadecimale come varchar2.
Esempi
L'esempio seguente recupera la rappresentazione esadecimale di un GUID:
select to_hex(newid())
--------------------------------------
cde6acae957b492ea304bfd8692f1ace
L'esempio seguente recupera la rappresentazione esadecimale di una variante compressa con GZIP del carattere ASCII a un byte x:
select to_hex(gzip('eA=='))
--------------------------------------
1F8B0800E4BF266A00FFAB00008316DC8C01000000