XMLFOREST Function | XML Data Type | Teradata Vantage - XMLFOREST - Advanced SQL Engine - Teradata Database

XML Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
amr1556233250442.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1140
lifecycle
previous
Product Category
Teradata Vantageā„¢

Constructs a sequence of XML elements, which when serialized return a concatenation of the serializations of individual members of the sequence.

Syntax

XMLFOREST (
  [ XML_namespace_declaration , ]

  [ forest_element_spec [,...] ]

  [ OPTION
    {
      { NULL | EMPTY | ABSENT | NIL } ON NULL |
        NIL ON NO CONTENT
    }
  ]

  [ RETURNING { CONTENT | SEQUENCE } ]
)
You can include only one default namespace declaration item. It can appear in any position in the list of comma-separated namespace declarations or at the end of the list.
XML_namespace_declaration
XMLNAMESPACES (
  { 'XML_namespace_URI' AS XML_namespace_prefix |
    DEFAULT 'XML_namespace_URI' |
    NO DEFAULT
  } [,...]
)

XML namespaces that are scoped when the query expressions (row and column) are evaluated.

Namespaces declared in the prolog of the queries override any namespace declarations specified here.
forest_element_spec
forest_element_value [ AS forest_element_name ]
OPTION
NULL ON NULL
EMPTY ON NULL
ABSENT ON NULL
NIL ON NULL
NIL ON NO CONTENT
XML content options.
RETURNING CONTENT
The return value is an XQuery document node with the forest elements as its children.
RETURNING SEQUENCE
The return value is a sequence with the forest elements as items. This is the default.
'XML_namespace_URI'
The URI (Uniform Resource Identifier) that identifies the XML namespace.
XML_namespace_prefix
The namespace prefix.
forest_element_value
A value for the forest element.
forest_element_name
A name for the forest element.