Syntax - Analytics Database - Teradata Vantage

SQL External Routine Programming

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-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantageā„¢
void
FNC_GetStructuredAttributeByNdx ( UDT_HANDLE  udtHandle,
                                  int         attributeIndex,
                                  void       *returnValue,
                                  int         bufSize,
                                  int        *nullIndicator,
                                  int        *length )

Syntax Elements

udtHandle
The handle to a structured UDT:
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.
returnValue
A pointer to a buffer that FNC_GetStructuredAttributeByNdx uses to return the value of the attribute.
bufSize
the size in bytes of the returnValue buffer.
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.
length
The 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.