16.20 - Syntax - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Advanced SQL Engine
Teradata Database
Release Number
Release Date
April 2020
Content Type
Programming Reference
Publication ID
English (United States)
FNC_GetStructuredAttribute ( UDT_HANDLE  udtHandle,
                             char       *attributePath,
                             void       *returnValue,
                             int         bufSize,
                             int        *nullIndicator,
                             int        *length )
UDT_HANDLE udtHandle
the handle to a structured UDT that is defined to be an input parameter to a UDF, UDM, or external stored procedure.
char *attributePath
the dot delimited full path to the attribute.
For example, consider a structured UDT called PersonUDT that has an attribute called address that is an AddressUDT type, which in turn has an attribute called zipcode. To get the zipcode value, the full path is “address.zipcode”.
void *returnValue
a pointer to a buffer that FNC_GetStructuredAttribute 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 full path to the specified attribute includes a preceding null attribute.

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