TO_BYTES Function | Data Types and Literals | Teradata Vantage - TO_BYTES - Teradata Vantage - Analytics Database

SQL Data Types and Literals

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
uds1628112204571.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
exs1472253032394
lifecycle
latest
Product Category
Teradata Vantageā„¢
Decodes a sequence of characters in a given encoding into a sequence of bits. The following encodings are supported:
  • BaseX
  • BaseY
  • Base64M (MIME)
  • ASCII

where X is a power of 2 (for example, 2, 8, 16) and Y is not a power of 2 (for example, 10 and 36).

The result data type is VARBYTE or BLOB.

ANSI Compliance

This statement is a Teradata extension to the ANSI SQL:2011 standard.

Syntax

[TD_SYSFNLIB.] TO_BYTES ( instring, in_encoding )

Syntax Elements

TD_SYSFNLIB.
Name of the database where the function is located.
instring
The string value, that is, sequence of characters to be decoded.
in_encoding
The encoding TO_BYTES uses to return the sequence of characters specified by instring.