Invoking Embedded Services System Functions - Advanced SQL Engine - Teradata Database

SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-30
dita:mapPath
tpt1555966086716.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1145
lifecycle
previous
Product Category
Teradata Vantage™

Embedded Services System Functions are a type of UDF. They are located in the TD_SYSFNLIB database. To invoke these system functions, you should use the fully qualified syntax, for example, TD_SYSFNLIB.CEILING (arg).

Optionally, you can omit the database name, and use the function name by itself. For example, CEILING (arg). However, if you do not qualify the function name, and there is also a customer-developed UDF with the same name in the current database or in the SYSLIB database, Vantage follows the normal search path precedence for UDFs, and executes the customer-developed UDF instead of the embedded services system function. For more information on UDF search path precedence, see "UDF Locations" in Teradata Vantage™ - SQL External Routine Programming , B035-1147 .

To ensure you invoke the embedded services function, do one of the following:
  • Use the fully qualified function name, including the containing database: prepend TD_SYSFNLIB. when you invoke embedded services system functions.
  • Use the SET SESSION UDFSEARCHPATH statement to specify a UDF search path precendence that explicitly searches the TD_SYSFNLIB database before other locations. For more information on SET SESSION, see Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144
  • Remove any customer-developed UDFs with the same name from the normal UDF search path.