17.10 - teradata_optional Attribute
teradata_optional_attributes Attribute - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - XML Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1140-171K
Language
English (United States)

You can specify the following in the stylesheet:

  • The elements that are optional and will not be serialized if the corresponding value is a NULL
  • The elements that are required. An empty element, <el/>, or attribute with a null string value, at="", is created if the corresponding value is NULL.

Use the teradata_optional attribute to specify whether an element is generated as an empty element with an empty string value, or whether the element is skipped if the corresponding value in the SQL result set is NULL.

Use the teradata_optional_attributes attribute to specify which attribute(s) of the element is skipped if the corresponding value(s) in the SQL result set is NULL.