Examples | Explicit Conversion | Teradata Vantage - Example: Explicit Conversion of BLOB to VARBYTE - 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™

Consider the following table definition:

CREATE TABLE large_images 
  (id INTEGER
  ,image BLOB);

The following statement casts the BLOB column to a VARBYTE type, and uses the result as an argument to the POSITION function:

SELECT POSITION('FFF1'xb IN (CAST(image AS VARBYTE(64000))))
FROM large_images
WHERE id = 5;