Example: Concatenating Byte Strings - Analytics Database - Teradata Vantage

SQL Functions, Expressions, and Predicates

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-01-12
dita:mapPath
obm1628111499646.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
kby1472250656485
lifecycle
latest
Product Category
Teradata Vantageā„¢

This example shows how to concatenate byte strings. Consider the following table definition:

CREATE TABLE tsttbla
   (column_1 BYTE(2)
   ,column_2 VARBYTE(10)
   ,column_3 BLOB(128K) );

The following values are inserted into table tsttbla:

   INSERT tsttbla ('4142'XB, '7A7B7C'XB, '1A1B1C2B2C'XB);

The following SELECT statement concatenates column_2 and column_1 and column_3:

SELECT (column_2 || column_1 || column_3) (FORMAT 'X(20)')
FROM tsttbla ;

The result is:

((column_2||column_1)||column_3)
--------------------------------
7A7B7C41421A1B1C2B2C

The resulting data type is BLOB.