Example: Using XMLFOREST to Construct a Sequence of XML Elements - Analytics Database - Teradata Vantage

XML Data Type

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
2023-10-30
dita:mapPath
tkc1628112506748.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
dgs1472251600184
lifecycle
latest
Product Category
Teradata Vantageā„¢
SELECT XMLFOREST('(858)555-1234' AS Phone1, '(858)555-9876' AS Phone2);

The result of the query is:

XMLFOREST('(858)555-1234' AS Phone1, '(858)555-9876' AS Phone2)
---------------------------------------------------------------
<Phone1>(858)555-1234</Phone1><Phone2>(858)555-9876</Phone2>