Usage Notes - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
rin1593638965306.ditamap
dita:ditavalPath
rin1593638965306.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantageā„¢

A UDF, UDM, or external stored procedure can return an empty LOB value by returning without calling FNC_LobAppend.

The arguments are validated to the extent possible. If an argument is not valid, the request that invoked the UDF, UDM, or external stored procedure fails and typically returns an error that looks like this:

7554 Invalid LOCATOR argument to LOB access function in UDF     database_name.udf_name.

Control does not return to the UDF, UDM, or external stored procedure.

FNC_LobAppend needs to be called to populate a LOB that is defined as a column in an output stream of a table operator. Before calling FNC_LobAppend, you must call FNC_LobCol2Loc to obtain the LOB_RESULT_LOCATOR passed as the first argument to FNC_LobAppend.