17.10 - Syntax - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL External Routine Programming

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)
FNC_GetStructuredAttributeByNdx ( UDT_HANDLE  udtHandle,
                                  int         attributeIndex,
                                  void       *returnValue,
                                  int         bufSize,
                                  int        *nullIndicator,
                                  int        *length )

Syntax Elements

The handle to a structured UDT:
The index of an attribute at the top-most level of the UDT.
The range of values is from 0 to i-1, where 0 is the index of the first attribute in the UDT and i is the number of non-nested attributes in the UDT.
For example, consider a structured UDT called PointUDT that has two attributes: the first attribute is called x and the second attribute is called y. To get the x value, use an index of 0. Similarly, to get the y value, use an index of 1.
For details on how to get the value of a nested attribute, see Getting the Value of a Nested Attribute.
A pointer to a buffer that FNC_GetStructuredAttributeByNdx uses to return the value of the attribute.
the size in bytes of the returnValue buffer.
Whether the attribute is null.
If the value of nullIndicator is...
  • -1, then the attribute is null.

    A value of -1 can also indicate that the udtHandle argument is null.

  • 0, then the attribute is not null.
Rhe size in bytes of the value that FNC_GetStructuredAttributeByNdx returns in returnValue.
For character data types, the length includes the size of any null termination characters.