Documentación de Invantiveparte de Invantive Cloud
Foros de Soporte de InvantiveIniciar Sesión / Registrarse

TO_HEX

Sintaxis

%%{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))

Propósito

La función SQL TO_HEX convierte un blob en texto en notación hexadecimal.

Véanse también ASCII_TO_BLOB, BLOB_TO_TEXT y HEX_TO_BLOB.

Parámetros:

  • Entrada (blob): valor que se va a convertir a notación hexadecimal.

Resultado: la imagen blob se convierte en texto en notación hexadecimal como varchar2.

Ejemplos

El siguiente ejemplo obtiene la notación hexadecimal de un GUID:

select to_hex(newid())

--------------------------------------
cde6acae957b492ea304bfd8692f1ace

El siguiente ejemplo recupera la notación hexadecimal de una variante comprimida con GZIP del carácter ASCII de un solo byte x:

select to_hex(gzip('eA=='))

--------------------------------------
1F8B0800E4BF266A00FFAB00008316DC8C01000000