15.00 - SQL UDFs and Embedded SQL - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

Product
Teradata Database
Release Number
15.00
Content Type
Programming Reference
Publication ID
B035-1184-015K
Language
English (United States)

SQL UDFs and Embedded SQL

You can invoke an SQL UDF from embedded SQL requests in the same way you would invoke an SQL UDF from an interactive SQL request. Other than restrictions that apply to the use of SQL expressions in an embedded SQL program (see SQL Stored Procedures and Embedded SQL) you can invoke SQL UDFs from an embedded SQL request without any restrictions.

The following example shows one possible way to invoke an SQL UDF, in this case common_value_expression, from an embedded SQL request.

     EXEC SQL FOR 19
       INSERT INTO t1
       VALUES (:var1, df2.common_value_expression(:var2, 2), :var3);