17.05 - Example: Invoking an SQL UDF Within a Search Condition - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Manipulation Language

Advanced SQL Engine
Teradata Database
Release Number
Release Date
January 2021
Content Type
Programming Reference
Publication ID
English (United States)

You can invoke an SQL UDF within a WHERE clause search condition if the UDF returns a value expression.

This example shows a correct invocation of the SQL UDF value_expression within a WHERE clause.

     SELECT test.value_expression(t1.a1, t2.a2)
     FROM t1, t2
     WHERE t1.b1 = t2.b2
     AND   test.value_expression(t1.a1, t2.a2) = 10;