DECODE

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Decodes binary data from a textual representation.

Syntax 

1decode(<string>, <format>)

Arguments 

Required 

  • <string>: The encoded string to decode.
  • <format>: The encoding format of the string (base64, hex, or escape).

Returns 

Returns bytea (binary data) decoded from the textual representation.

Examples 

Decode Base64 

Decode a base64-encoded string.

1SELECT decode('MTIzXDAwMFwwMDE=', 'base64') AS result;

Returns 123\000\001.

Related Documentation 

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!