16.20 - Syntax - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
April 2020
Content Type
Programming Reference
Publication ID
B035-1147-162K
Language
English (United States)
void
FNC_GetStructuredAttributeByNdx ( UDT_HANDLE  udtHandle,
                                  int         attributeIndex,
                                  void       *returnValue,
                                  int         bufSize,
                                  int        *nullIndicator,
                                  int        *length )
UDT_HANDLE udtHandle
The handle to a structured UDT:
int attributeIndex
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.
void *returnValue
A pointer to a buffer that FNC_GetStructuredAttributeByNdx uses to return the value of the attribute.
int bufSize
the size in bytes of the returnValue buffer.
int *nullIndicator
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.
int *length
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.